• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>generic::stream_protocol</title>
5<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../boost_asio.html" title="Boost.Asio">
8<link rel="up" href="../reference.html" title="Reference">
9<link rel="prev" href="generic__seq_packet_protocol/type.html" title="generic::seq_packet_protocol::type">
10<link rel="next" href="generic__stream_protocol/endpoint.html" title="generic::stream_protocol::endpoint">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15<td align="center"><a href="../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="generic__seq_packet_protocol/type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generic__stream_protocol/endpoint.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="boost_asio.reference.generic__stream_protocol"></a><a class="link" href="generic__stream_protocol.html" title="generic::stream_protocol">generic::stream_protocol</a>
28</h3></div></div></div>
29<p>
30        Encapsulates the flags needed for a generic stream-oriented socket.
31      </p>
32<pre class="programlisting">class stream_protocol
33</pre>
34<h5>
35<a name="boost_asio.reference.generic__stream_protocol.h0"></a>
36        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.types"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.types">Types</a>
37      </h5>
38<div class="informaltable"><table class="table">
39<colgroup>
40<col>
41<col>
42</colgroup>
43<thead><tr>
44<th>
45                <p>
46                  Name
47                </p>
48              </th>
49<th>
50                <p>
51                  Description
52                </p>
53              </th>
54</tr></thead>
55<tbody>
56<tr>
57<td>
58                <p>
59                  <a class="link" href="generic__stream_protocol/endpoint.html" title="generic::stream_protocol::endpoint"><span class="bold"><strong>endpoint</strong></span></a>
60                </p>
61              </td>
62<td>
63                <p>
64                  The type of an endpoint.
65                </p>
66              </td>
67</tr>
68<tr>
69<td>
70                <p>
71                  <a class="link" href="generic__stream_protocol/iostream.html" title="generic::stream_protocol::iostream"><span class="bold"><strong>iostream</strong></span></a>
72                </p>
73              </td>
74<td>
75                <p>
76                  The generic socket iostream type.
77                </p>
78              </td>
79</tr>
80<tr>
81<td>
82                <p>
83                  <a class="link" href="generic__stream_protocol/socket.html" title="generic::stream_protocol::socket"><span class="bold"><strong>socket</strong></span></a>
84                </p>
85              </td>
86<td>
87                <p>
88                  The generic socket type.
89                </p>
90              </td>
91</tr>
92</tbody>
93</table></div>
94<h5>
95<a name="boost_asio.reference.generic__stream_protocol.h1"></a>
96        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.member_functions"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.member_functions">Member
97        Functions</a>
98      </h5>
99<div class="informaltable"><table class="table">
100<colgroup>
101<col>
102<col>
103</colgroup>
104<thead><tr>
105<th>
106                <p>
107                  Name
108                </p>
109              </th>
110<th>
111                <p>
112                  Description
113                </p>
114              </th>
115</tr></thead>
116<tbody>
117<tr>
118<td>
119                <p>
120                  <a class="link" href="generic__stream_protocol/family.html" title="generic::stream_protocol::family"><span class="bold"><strong>family</strong></span></a>
121                </p>
122              </td>
123<td>
124                <p>
125                  Obtain an identifier for the protocol family.
126                </p>
127              </td>
128</tr>
129<tr>
130<td>
131                <p>
132                  <a class="link" href="generic__stream_protocol/protocol.html" title="generic::stream_protocol::protocol"><span class="bold"><strong>protocol</strong></span></a>
133                </p>
134              </td>
135<td>
136                <p>
137                  Obtain an identifier for the protocol.
138                </p>
139              </td>
140</tr>
141<tr>
142<td>
143                <p>
144                  <a class="link" href="generic__stream_protocol/stream_protocol.html" title="generic::stream_protocol::stream_protocol"><span class="bold"><strong>stream_protocol</strong></span></a> <span class="silver">[constructor]</span>
145                </p>
146              </td>
147<td>
148                <p>
149                  Construct a protocol object for a specific address family and protocol.
150                  <br> <span class="silver"> —</span><br> Construct a generic protocol object from a specific
151                  protocol.
152                </p>
153              </td>
154</tr>
155<tr>
156<td>
157                <p>
158                  <a class="link" href="generic__stream_protocol/type.html" title="generic::stream_protocol::type"><span class="bold"><strong>type</strong></span></a>
159                </p>
160              </td>
161<td>
162                <p>
163                  Obtain an identifier for the type of the protocol.
164                </p>
165              </td>
166</tr>
167</tbody>
168</table></div>
169<h5>
170<a name="boost_asio.reference.generic__stream_protocol.h2"></a>
171        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.friends"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.friends">Friends</a>
172      </h5>
173<div class="informaltable"><table class="table">
174<colgroup>
175<col>
176<col>
177</colgroup>
178<thead><tr>
179<th>
180                <p>
181                  Name
182                </p>
183              </th>
184<th>
185                <p>
186                  Description
187                </p>
188              </th>
189</tr></thead>
190<tbody>
191<tr>
192<td>
193                <p>
194                  <a class="link" href="generic__stream_protocol/operator_not__eq_.html" title="generic::stream_protocol::operator!="><span class="bold"><strong>operator!=</strong></span></a>
195                </p>
196              </td>
197<td>
198                <p>
199                  Compare two protocols for inequality.
200                </p>
201              </td>
202</tr>
203<tr>
204<td>
205                <p>
206                  <a class="link" href="generic__stream_protocol/operator_eq__eq_.html" title="generic::stream_protocol::operator=="><span class="bold"><strong>operator==</strong></span></a>
207                </p>
208              </td>
209<td>
210                <p>
211                  Compare two protocols for equality.
212                </p>
213              </td>
214</tr>
215</tbody>
216</table></div>
217<p>
218        The <a class="link" href="generic__stream_protocol.html" title="generic::stream_protocol"><code class="computeroutput">generic::stream_protocol</code></a>
219        class contains flags necessary for stream-oriented sockets of any address
220        family and protocol.
221      </p>
222<h5>
223<a name="boost_asio.reference.generic__stream_protocol.h3"></a>
224        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.examples"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.examples">Examples</a>
225      </h5>
226<p>
227        Constructing using a native address family and socket protocol:
228      </p>
229<pre class="programlisting">stream_protocol p(AF_INET, IPPROTO_TCP);
230</pre>
231<p>
232        Constructing from a specific protocol type:
233      </p>
234<pre class="programlisting">stream_protocol p(boost::asio::ip::tcp::v4());
235</pre>
236<h5>
237<a name="boost_asio.reference.generic__stream_protocol.h4"></a>
238        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.thread_safety"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.thread_safety">Thread
239        Safety</a>
240      </h5>
241<p>
242        <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
243      </p>
244<p>
245        <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
246      </p>
247<h5>
248<a name="boost_asio.reference.generic__stream_protocol.h5"></a>
249        <span class="phrase"><a name="boost_asio.reference.generic__stream_protocol.requirements"></a></span><a class="link" href="generic__stream_protocol.html#boost_asio.reference.generic__stream_protocol.requirements">Requirements</a>
250      </h5>
251<p>
252        <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/generic/stream_protocol.hpp</code>
253      </p>
254<p>
255        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
256      </p>
257</div>
258<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
259<td align="left"></td>
260<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
261      Kohlhoff<p>
262        Distributed under the Boost Software License, Version 1.0. (See accompanying
263        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
264      </p>
265</div></td>
266</tr></table>
267<hr>
268<div class="spirit-nav">
269<a accesskey="p" href="generic__seq_packet_protocol/type.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="generic__stream_protocol/endpoint.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
270</div>
271</body>
272</html>
273