3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>generic::raw_protocol::socket</title>
5 <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
8 <link rel="up" href="../generic__raw_protocol.html" title="generic::raw_protocol">
9 <link rel="prev" href="raw_protocol/overload2.html" title="generic::raw_protocol::raw_protocol (2 of 2 overloads)">
10 <link rel="next" href="type.html" title="generic::raw_protocol::type">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="raw_protocol/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generic__raw_protocol.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="type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="boost_asio.reference.generic__raw_protocol.socket"></a><a class="link" href="socket.html" title="generic::raw_protocol::socket">generic::raw_protocol::socket</a>
28 </h4></div></div></div>
30 <a class="indexterm" name="idp169176384"></a>
31 The generic socket type.
33 <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_raw_socket</span><span class="special"><</span> <span class="identifier">raw_protocol</span> <span class="special">></span> <span class="identifier">socket</span><span class="special">;</span>
36 <a name="boost_asio.reference.generic__raw_protocol.socket.h0"></a>
37 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.types"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.types">Types</a>
39 <div class="informaltable"><table class="table">
60 <a class="link" href="../basic_raw_socket/broadcast.html" title="basic_raw_socket::broadcast"><span class="bold"><strong>broadcast</strong></span></a>
65 Socket option to permit sending of broadcast messages.
72 <a class="link" href="../basic_raw_socket/bytes_readable.html" title="basic_raw_socket::bytes_readable"><span class="bold"><strong>bytes_readable</strong></span></a>
77 IO control command to get the amount of data that can be read
85 <a class="link" href="../basic_raw_socket/debug.html" title="basic_raw_socket::debug"><span class="bold"><strong>debug</strong></span></a>
90 Socket option to enable socket-level debugging.
97 <a class="link" href="../basic_raw_socket/do_not_route.html" title="basic_raw_socket::do_not_route"><span class="bold"><strong>do_not_route</strong></span></a>
102 Socket option to prevent routing, use local interfaces only.
109 <a class="link" href="../basic_raw_socket/enable_connection_aborted.html" title="basic_raw_socket::enable_connection_aborted"><span class="bold"><strong>enable_connection_aborted</strong></span></a>
114 Socket option to report aborted connections on accept.
121 <a class="link" href="../basic_raw_socket/endpoint_type.html" title="basic_raw_socket::endpoint_type"><span class="bold"><strong>endpoint_type</strong></span></a>
133 <a class="link" href="../basic_raw_socket/implementation_type.html" title="basic_raw_socket::implementation_type"><span class="bold"><strong>implementation_type</strong></span></a>
138 The underlying implementation type of I/O object.
145 <a class="link" href="../basic_raw_socket/keep_alive.html" title="basic_raw_socket::keep_alive"><span class="bold"><strong>keep_alive</strong></span></a>
150 Socket option to send keep-alives.
157 <a class="link" href="../basic_raw_socket/linger.html" title="basic_raw_socket::linger"><span class="bold"><strong>linger</strong></span></a>
162 Socket option to specify whether the socket lingers on close
163 if unsent data is present.
170 <a class="link" href="../basic_raw_socket/lowest_layer_type.html" title="basic_raw_socket::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a>
175 A basic_socket is always the lowest layer.
182 <a class="link" href="../basic_raw_socket/message_flags.html" title="basic_raw_socket::message_flags"><span class="bold"><strong>message_flags</strong></span></a>
187 Bitmask type for flags that can be passed to send and receive
195 <a class="link" href="../basic_raw_socket/native_handle_type.html" title="basic_raw_socket::native_handle_type"><span class="bold"><strong>native_handle_type</strong></span></a>
200 The native representation of a socket.
207 <a class="link" href="../basic_raw_socket/native_type.html" title="basic_raw_socket::native_type"><span class="bold"><strong>native_type</strong></span></a>
212 (Deprecated: Use native_handle_type.) The native representation
220 <a class="link" href="../basic_raw_socket/non_blocking_io.html" title="basic_raw_socket::non_blocking_io"><span class="bold"><strong>non_blocking_io</strong></span></a>
225 (Deprecated: Use non_blocking().) IO control command to set the
226 blocking mode of the socket.
233 <a class="link" href="../basic_raw_socket/protocol_type.html" title="basic_raw_socket::protocol_type"><span class="bold"><strong>protocol_type</strong></span></a>
245 <a class="link" href="../basic_raw_socket/receive_buffer_size.html" title="basic_raw_socket::receive_buffer_size"><span class="bold"><strong>receive_buffer_size</strong></span></a>
250 Socket option for the receive buffer size of a socket.
257 <a class="link" href="../basic_raw_socket/receive_low_watermark.html" title="basic_raw_socket::receive_low_watermark"><span class="bold"><strong>receive_low_watermark</strong></span></a>
262 Socket option for the receive low watermark.
269 <a class="link" href="../basic_raw_socket/reuse_address.html" title="basic_raw_socket::reuse_address"><span class="bold"><strong>reuse_address</strong></span></a>
274 Socket option to allow the socket to be bound to an address that
282 <a class="link" href="../basic_raw_socket/send_buffer_size.html" title="basic_raw_socket::send_buffer_size"><span class="bold"><strong>send_buffer_size</strong></span></a>
287 Socket option for the send buffer size of a socket.
294 <a class="link" href="../basic_raw_socket/send_low_watermark.html" title="basic_raw_socket::send_low_watermark"><span class="bold"><strong>send_low_watermark</strong></span></a>
299 Socket option for the send low watermark.
306 <a class="link" href="../basic_raw_socket/service_type.html" title="basic_raw_socket::service_type"><span class="bold"><strong>service_type</strong></span></a>
311 The type of the service that will be used to provide I/O operations.
318 <a class="link" href="../basic_raw_socket/shutdown_type.html" title="basic_raw_socket::shutdown_type"><span class="bold"><strong>shutdown_type</strong></span></a>
323 Different ways a socket may be shutdown.
330 <a name="boost_asio.reference.generic__raw_protocol.socket.h1"></a>
331 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.member_functions"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.member_functions">Member
334 <div class="informaltable"><table class="table">
355 <a class="link" href="../basic_raw_socket/assign.html" title="basic_raw_socket::assign"><span class="bold"><strong>assign</strong></span></a>
360 Assign an existing native socket to the socket.
367 <a class="link" href="../basic_raw_socket/async_connect.html" title="basic_raw_socket::async_connect"><span class="bold"><strong>async_connect</strong></span></a>
372 Start an asynchronous connect.
379 <a class="link" href="../basic_raw_socket/async_receive.html" title="basic_raw_socket::async_receive"><span class="bold"><strong>async_receive</strong></span></a>
384 Start an asynchronous receive on a connected socket.
391 <a class="link" href="../basic_raw_socket/async_receive_from.html" title="basic_raw_socket::async_receive_from"><span class="bold"><strong>async_receive_from</strong></span></a>
396 Start an asynchronous receive.
403 <a class="link" href="../basic_raw_socket/async_send.html" title="basic_raw_socket::async_send"><span class="bold"><strong>async_send</strong></span></a>
408 Start an asynchronous send on a connected socket.
415 <a class="link" href="../basic_raw_socket/async_send_to.html" title="basic_raw_socket::async_send_to"><span class="bold"><strong>async_send_to</strong></span></a>
420 Start an asynchronous send.
427 <a class="link" href="../basic_raw_socket/at_mark.html" title="basic_raw_socket::at_mark"><span class="bold"><strong>at_mark</strong></span></a>
432 Determine whether the socket is at the out-of-band data mark.
439 <a class="link" href="../basic_raw_socket/available.html" title="basic_raw_socket::available"><span class="bold"><strong>available</strong></span></a>
444 Determine the number of bytes available for reading.
451 <a class="link" href="../basic_raw_socket/basic_raw_socket.html" title="basic_raw_socket::basic_raw_socket"><span class="bold"><strong>basic_raw_socket</strong></span></a>
456 Construct a basic_raw_socket without opening it.
459 Construct and open a basic_raw_socket.
462 Construct a basic_raw_socket, opening it and binding it to the
463 given local endpoint.
466 Construct a basic_raw_socket on an existing native socket.
469 Move-construct a basic_raw_socket from another.
472 Move-construct a basic_raw_socket from a socket of another protocol
480 <a class="link" href="../basic_raw_socket/bind.html" title="basic_raw_socket::bind"><span class="bold"><strong>bind</strong></span></a>
485 Bind the socket to the given local endpoint.
492 <a class="link" href="../basic_raw_socket/cancel.html" title="basic_raw_socket::cancel"><span class="bold"><strong>cancel</strong></span></a>
497 Cancel all asynchronous operations associated with the socket.
504 <a class="link" href="../basic_raw_socket/close.html" title="basic_raw_socket::close"><span class="bold"><strong>close</strong></span></a>
516 <a class="link" href="../basic_raw_socket/connect.html" title="basic_raw_socket::connect"><span class="bold"><strong>connect</strong></span></a>
521 Connect the socket to the specified endpoint.
528 <a class="link" href="../basic_raw_socket/get_io_service.html" title="basic_raw_socket::get_io_service"><span class="bold"><strong>get_io_service</strong></span></a>
533 Get the io_service associated with the object.
540 <a class="link" href="../basic_raw_socket/get_option.html" title="basic_raw_socket::get_option"><span class="bold"><strong>get_option</strong></span></a>
545 Get an option from the socket.
552 <a class="link" href="../basic_raw_socket/io_control.html" title="basic_raw_socket::io_control"><span class="bold"><strong>io_control</strong></span></a>
557 Perform an IO control command on the socket.
564 <a class="link" href="../basic_raw_socket/is_open.html" title="basic_raw_socket::is_open"><span class="bold"><strong>is_open</strong></span></a>
569 Determine whether the socket is open.
576 <a class="link" href="../basic_raw_socket/local_endpoint.html" title="basic_raw_socket::local_endpoint"><span class="bold"><strong>local_endpoint</strong></span></a>
581 Get the local endpoint of the socket.
588 <a class="link" href="../basic_raw_socket/lowest_layer.html" title="basic_raw_socket::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a>
593 Get a reference to the lowest layer.
596 Get a const reference to the lowest layer.
603 <a class="link" href="../basic_raw_socket/native.html" title="basic_raw_socket::native"><span class="bold"><strong>native</strong></span></a>
608 (Deprecated: Use native_handle().) Get the native socket representation.
615 <a class="link" href="../basic_raw_socket/native_handle.html" title="basic_raw_socket::native_handle"><span class="bold"><strong>native_handle</strong></span></a>
620 Get the native socket representation.
627 <a class="link" href="../basic_raw_socket/native_non_blocking.html" title="basic_raw_socket::native_non_blocking"><span class="bold"><strong>native_non_blocking</strong></span></a>
632 Gets the non-blocking mode of the native socket implementation.
635 Sets the non-blocking mode of the native socket implementation.
642 <a class="link" href="../basic_raw_socket/non_blocking.html" title="basic_raw_socket::non_blocking"><span class="bold"><strong>non_blocking</strong></span></a>
647 Gets the non-blocking mode of the socket.
650 Sets the non-blocking mode of the socket.
657 <a class="link" href="../basic_raw_socket/open.html" title="basic_raw_socket::open"><span class="bold"><strong>open</strong></span></a>
662 Open the socket using the specified protocol.
669 <a class="link" href="../basic_raw_socket/operator_eq_.html" title="basic_raw_socket::operator="><span class="bold"><strong>operator=</strong></span></a>
674 Move-assign a basic_raw_socket from another.
677 Move-assign a basic_raw_socket from a socket of another protocol
685 <a class="link" href="../basic_raw_socket/receive.html" title="basic_raw_socket::receive"><span class="bold"><strong>receive</strong></span></a>
690 Receive some data on a connected socket.
697 <a class="link" href="../basic_raw_socket/receive_from.html" title="basic_raw_socket::receive_from"><span class="bold"><strong>receive_from</strong></span></a>
702 Receive raw data with the endpoint of the sender.
709 <a class="link" href="../basic_raw_socket/remote_endpoint.html" title="basic_raw_socket::remote_endpoint"><span class="bold"><strong>remote_endpoint</strong></span></a>
714 Get the remote endpoint of the socket.
721 <a class="link" href="../basic_raw_socket/send.html" title="basic_raw_socket::send"><span class="bold"><strong>send</strong></span></a>
726 Send some data on a connected socket.
733 <a class="link" href="../basic_raw_socket/send_to.html" title="basic_raw_socket::send_to"><span class="bold"><strong>send_to</strong></span></a>
738 Send raw data to the specified endpoint.
745 <a class="link" href="../basic_raw_socket/set_option.html" title="basic_raw_socket::set_option"><span class="bold"><strong>set_option</strong></span></a>
750 Set an option on the socket.
757 <a class="link" href="../basic_raw_socket/shutdown.html" title="basic_raw_socket::shutdown"><span class="bold"><strong>shutdown</strong></span></a>
762 Disable sends or receives on the socket.
769 <a name="boost_asio.reference.generic__raw_protocol.socket.h2"></a>
770 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.protected_member_functions"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.protected_member_functions">Protected
773 <div class="informaltable"><table class="table">
794 <a class="link" href="../basic_raw_socket/get_implementation.html" title="basic_raw_socket::get_implementation"><span class="bold"><strong>get_implementation</strong></span></a>
799 Get the underlying implementation of the I/O object.
806 <a class="link" href="../basic_raw_socket/get_service.html" title="basic_raw_socket::get_service"><span class="bold"><strong>get_service</strong></span></a>
811 Get the service associated with the I/O object.
818 <a name="boost_asio.reference.generic__raw_protocol.socket.h3"></a>
819 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.data_members">Data
822 <div class="informaltable"><table class="table">
843 <a class="link" href="../basic_raw_socket/max_connections.html" title="basic_raw_socket::max_connections"><span class="bold"><strong>max_connections</strong></span></a>
848 The maximum length of the queue of pending incoming connections.
855 <a class="link" href="../basic_raw_socket/message_do_not_route.html" title="basic_raw_socket::message_do_not_route"><span class="bold"><strong>message_do_not_route</strong></span></a>
860 Specify that the data should not be subject to routing.
867 <a class="link" href="../basic_raw_socket/message_end_of_record.html" title="basic_raw_socket::message_end_of_record"><span class="bold"><strong>message_end_of_record</strong></span></a>
872 Specifies that the data marks the end of a record.
879 <a class="link" href="../basic_raw_socket/message_out_of_band.html" title="basic_raw_socket::message_out_of_band"><span class="bold"><strong>message_out_of_band</strong></span></a>
884 Process out-of-band data.
891 <a class="link" href="../basic_raw_socket/message_peek.html" title="basic_raw_socket::message_peek"><span class="bold"><strong>message_peek</strong></span></a>
896 Peek at incoming data without removing it from the input queue.
903 <a name="boost_asio.reference.generic__raw_protocol.socket.h4"></a>
904 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.protected_data_members"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.protected_data_members">Protected
907 <div class="informaltable"><table class="table">
928 <a class="link" href="../basic_raw_socket/implementation.html" title="basic_raw_socket::implementation"><span class="bold"><strong>implementation</strong></span></a>
933 (Deprecated: Use get_implementation().) The underlying implementation
941 <a class="link" href="../basic_raw_socket/service.html" title="basic_raw_socket::service"><span class="bold"><strong>service</strong></span></a>
946 (Deprecated: Use get_service().) The service associated with
954 The <a class="link" href="../basic_raw_socket.html" title="basic_raw_socket"><code class="computeroutput"><span class="identifier">basic_raw_socket</span></code></a> class template
955 provides asynchronous and blocking raw-oriented socket functionality.
958 <a name="boost_asio.reference.generic__raw_protocol.socket.h5"></a>
959 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.thread_safety"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.thread_safety">Thread
963 <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
966 <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
969 <a name="boost_asio.reference.generic__raw_protocol.socket.h6"></a>
970 <span class="phrase"><a name="boost_asio.reference.generic__raw_protocol.socket.requirements"></a></span><a class="link" href="socket.html#boost_asio.reference.generic__raw_protocol.socket.requirements">Requirements</a>
973 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/generic/raw_protocol.hpp</code>
976 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
979 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
980 <td align="left"></td>
981 <td align="right"><div class="copyright-footer">Copyright © 2003-2014 Christopher M. Kohlhoff<p>
982 Distributed under the Boost Software License, Version 1.0. (See accompanying
983 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>)
988 <div class="spirit-nav">
989 <a accesskey="p" href="raw_protocol/overload2.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generic__raw_protocol.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="type.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>