#include <stream_socket_service.hpp>

Public Types | |
| typedef Protocol | protocol_type |
| The protocol type. | |
| typedef Protocol::endpoint | endpoint_type |
| The endpoint type. | |
| typedef service_impl_type::implementation_type | implementation_type |
| The type of a stream socket implementation. | |
| typedef service_impl_type::native_type | native_type |
| The native socket type. | |
Public Member Functions | |
| stream_socket_service (asio::io_service &io_service) | |
| Construct a new stream socket service for the specified io_service. | |
| void | shutdown_service () |
| Destroy all user-defined handler objects owned by the service. | |
| void | construct (implementation_type &impl) |
| Construct a new stream socket implementation. | |
| void | destroy (implementation_type &impl) |
| Destroy a stream socket implementation. | |
| asio::error_code | open (implementation_type &impl, const protocol_type &protocol, asio::error_code &ec) |
| Open a stream socket. | |
| asio::error_code | assign (implementation_type &impl, const protocol_type &protocol, const native_type &native_socket, asio::error_code &ec) |
| Assign an existing native socket to a stream socket. | |
| bool | is_open (const implementation_type &impl) const |
| Determine whether the socket is open. | |
| asio::error_code | close (implementation_type &impl, asio::error_code &ec) |
| Close a stream socket implementation. | |
| native_type | native (implementation_type &impl) |
| Get the native socket implementation. | |
| asio::error_code | cancel (implementation_type &impl, asio::error_code &ec) |
| Cancel all asynchronous operations associated with the socket. | |
| bool | at_mark (const implementation_type &impl, asio::error_code &ec) const |
| Determine whether the socket is at the out-of-band data mark. | |
| std::size_t | available (const implementation_type &impl, asio::error_code &ec) const |
| Determine the number of bytes available for reading. | |
| asio::error_code | bind (implementation_type &impl, const endpoint_type &endpoint, asio::error_code &ec) |
| Bind the stream socket to the specified local endpoint. | |
| asio::error_code | connect (implementation_type &impl, const endpoint_type &peer_endpoint, asio::error_code &ec) |
| Connect the stream socket to the specified endpoint. | |
| template<typename ConnectHandler> | |
| void | async_connect (implementation_type &impl, const endpoint_type &peer_endpoint, ConnectHandler handler) |
| Start an asynchronous connect. | |
| template<typename SettableSocketOption> | |
| asio::error_code | set_option (implementation_type &impl, const SettableSocketOption &option, asio::error_code &ec) |
| Set a socket option. | |
| template<typename GettableSocketOption> | |
| asio::error_code | get_option (const implementation_type &impl, GettableSocketOption &option, asio::error_code &ec) const |
| Get a socket option. | |
| template<typename IoControlCommand> | |
| asio::error_code | io_control (implementation_type &impl, IoControlCommand &command, asio::error_code &ec) |
| Perform an IO control command on the socket. | |
| endpoint_type | local_endpoint (const implementation_type &impl, asio::error_code &ec) const |
| Get the local endpoint. | |
| endpoint_type | remote_endpoint (const implementation_type &impl, asio::error_code &ec) const |
| Get the remote endpoint. | |
| asio::error_code | shutdown (implementation_type &impl, socket_base::shutdown_type what, asio::error_code &ec) |
| Disable sends or receives on the socket. | |
| template<typename ConstBufferSequence> | |
| std::size_t | send (implementation_type &impl, const ConstBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec) |
| Send the given data to the peer. | |
| template<typename ConstBufferSequence, typename WriteHandler> | |
| void | async_send (implementation_type &impl, const ConstBufferSequence &buffers, socket_base::message_flags flags, WriteHandler handler) |
| Start an asynchronous send. | |
| template<typename MutableBufferSequence> | |
| std::size_t | receive (implementation_type &impl, const MutableBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec) |
| Receive some data from the peer. | |
| template<typename MutableBufferSequence, typename ReadHandler> | |
| void | async_receive (implementation_type &impl, const MutableBufferSequence &buffers, socket_base::message_flags flags, ReadHandler handler) |
| Start an asynchronous receive. | |
Private Types | |
| typedef detail::reactive_socket_service < Protocol, detail::select_reactor< false > > | service_impl_type |
Private Attributes | |
| service_impl_type & | service_impl_ |
Definition at line 38 of file stream_socket_service.hpp.
| typedef Protocol asio::stream_socket_service< Protocol >::protocol_type |
| typedef Protocol::endpoint asio::stream_socket_service< Protocol >::endpoint_type |
typedef detail::reactive_socket_service< Protocol, detail::select_reactor<false> > asio::stream_socket_service< Protocol >::service_impl_type [private] |
Definition at line 69 of file stream_socket_service.hpp.
| typedef service_impl_type::implementation_type asio::stream_socket_service< Protocol >::implementation_type |
The type of a stream socket implementation.
Definition at line 77 of file stream_socket_service.hpp.
| typedef service_impl_type::native_type asio::stream_socket_service< Protocol >::native_type |
| asio::stream_socket_service< Protocol >::stream_socket_service | ( | asio::io_service & | io_service | ) | [inline, explicit] |
Construct a new stream socket service for the specified io_service.
Definition at line 88 of file stream_socket_service.hpp.
| void asio::stream_socket_service< Protocol >::shutdown_service | ( | ) | [inline, virtual] |
Destroy all user-defined handler objects owned by the service.
Implements asio::io_service::service.
Definition at line 96 of file stream_socket_service.hpp.
| void asio::stream_socket_service< Protocol >::construct | ( | implementation_type & | impl | ) | [inline] |
Construct a new stream socket implementation.
Definition at line 101 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::construct(), and asio::stream_socket_service< Protocol >::service_impl_.
| void asio::stream_socket_service< Protocol >::destroy | ( | implementation_type & | impl | ) | [inline] |
Destroy a stream socket implementation.
Definition at line 107 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::destroy(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::open | ( | implementation_type & | impl, | |
| const protocol_type & | protocol, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Open a stream socket.
Definition at line 113 of file stream_socket_service.hpp.
References asio::detail::error_base< T >::invalid_argument, asio::detail::reactive_socket_service< Protocol, Reactor >::open(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::assign | ( | implementation_type & | impl, | |
| const protocol_type & | protocol, | |||
| const native_type & | native_socket, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Assign an existing native socket to a stream socket.
Definition at line 124 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::assign(), and asio::stream_socket_service< Protocol >::service_impl_.
| bool asio::stream_socket_service< Protocol >::is_open | ( | const implementation_type & | impl | ) | const [inline] |
Determine whether the socket is open.
Definition at line 132 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::is_open(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::close | ( | implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | [inline] |
Close a stream socket implementation.
Definition at line 138 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::close(), and asio::stream_socket_service< Protocol >::service_impl_.
| native_type asio::stream_socket_service< Protocol >::native | ( | implementation_type & | impl | ) | [inline] |
Get the native socket implementation.
Definition at line 145 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::native(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::cancel | ( | implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | [inline] |
Cancel all asynchronous operations associated with the socket.
Definition at line 151 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::cancel(), and asio::stream_socket_service< Protocol >::service_impl_.
| bool asio::stream_socket_service< Protocol >::at_mark | ( | const implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | const [inline] |
Determine whether the socket is at the out-of-band data mark.
Definition at line 158 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::at_mark(), and asio::stream_socket_service< Protocol >::service_impl_.
| std::size_t asio::stream_socket_service< Protocol >::available | ( | const implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | const [inline] |
Determine the number of bytes available for reading.
Definition at line 165 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::available(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::bind | ( | implementation_type & | impl, | |
| const endpoint_type & | endpoint, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Bind the stream socket to the specified local endpoint.
Definition at line 172 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::bind(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::connect | ( | implementation_type & | impl, | |
| const endpoint_type & | peer_endpoint, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Connect the stream socket to the specified endpoint.
Definition at line 179 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::connect(), and asio::stream_socket_service< Protocol >::service_impl_.
| void asio::stream_socket_service< Protocol >::async_connect | ( | implementation_type & | impl, | |
| const endpoint_type & | peer_endpoint, | |||
| ConnectHandler | handler | |||
| ) | [inline] |
Start an asynchronous connect.
Definition at line 187 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::async_connect(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::set_option | ( | implementation_type & | impl, | |
| const SettableSocketOption & | option, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Set a socket option.
Definition at line 195 of file stream_socket_service.hpp.
References asio::stream_socket_service< Protocol >::service_impl_, and asio::detail::reactive_socket_service< Protocol, Reactor >::set_option().
| asio::error_code asio::stream_socket_service< Protocol >::get_option | ( | const implementation_type & | impl, | |
| GettableSocketOption & | option, | |||
| asio::error_code & | ec | |||
| ) | const [inline] |
Get a socket option.
Definition at line 203 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::get_option(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::io_control | ( | implementation_type & | impl, | |
| IoControlCommand & | command, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Perform an IO control command on the socket.
Definition at line 211 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::io_control(), and asio::stream_socket_service< Protocol >::service_impl_.
| endpoint_type asio::stream_socket_service< Protocol >::local_endpoint | ( | const implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | const [inline] |
Get the local endpoint.
Definition at line 218 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::local_endpoint(), and asio::stream_socket_service< Protocol >::service_impl_.
| endpoint_type asio::stream_socket_service< Protocol >::remote_endpoint | ( | const implementation_type & | impl, | |
| asio::error_code & | ec | |||
| ) | const [inline] |
Get the remote endpoint.
Definition at line 225 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::remote_endpoint(), and asio::stream_socket_service< Protocol >::service_impl_.
| asio::error_code asio::stream_socket_service< Protocol >::shutdown | ( | implementation_type & | impl, | |
| socket_base::shutdown_type | what, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Disable sends or receives on the socket.
Definition at line 232 of file stream_socket_service.hpp.
References asio::stream_socket_service< Protocol >::service_impl_, and asio::detail::reactive_socket_service< Protocol, Reactor >::shutdown().
| std::size_t asio::stream_socket_service< Protocol >::send | ( | implementation_type & | impl, | |
| const ConstBufferSequence & | buffers, | |||
| socket_base::message_flags | flags, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Send the given data to the peer.
Definition at line 240 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::send(), and asio::stream_socket_service< Protocol >::service_impl_.
| void asio::stream_socket_service< Protocol >::async_send | ( | implementation_type & | impl, | |
| const ConstBufferSequence & | buffers, | |||
| socket_base::message_flags | flags, | |||
| WriteHandler | handler | |||
| ) | [inline] |
Start an asynchronous send.
Definition at line 249 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::async_send(), and asio::stream_socket_service< Protocol >::service_impl_.
| std::size_t asio::stream_socket_service< Protocol >::receive | ( | implementation_type & | impl, | |
| const MutableBufferSequence & | buffers, | |||
| socket_base::message_flags | flags, | |||
| asio::error_code & | ec | |||
| ) | [inline] |
Receive some data from the peer.
Definition at line 258 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::receive(), and asio::stream_socket_service< Protocol >::service_impl_.
| void asio::stream_socket_service< Protocol >::async_receive | ( | implementation_type & | impl, | |
| const MutableBufferSequence & | buffers, | |||
| socket_base::message_flags | flags, | |||
| ReadHandler | handler | |||
| ) | [inline] |
Start an asynchronous receive.
Definition at line 267 of file stream_socket_service.hpp.
References asio::detail::reactive_socket_service< Protocol, Reactor >::async_receive(), and asio::stream_socket_service< Protocol >::service_impl_.
service_impl_type& asio::stream_socket_service< Protocol >::service_impl_ [private] |
Definition at line 276 of file stream_socket_service.hpp.
Referenced by asio::stream_socket_service< Protocol >::assign(), asio::stream_socket_service< Protocol >::async_connect(), asio::stream_socket_service< Protocol >::async_receive(), asio::stream_socket_service< Protocol >::async_send(), asio::stream_socket_service< Protocol >::at_mark(), asio::stream_socket_service< Protocol >::available(), asio::stream_socket_service< Protocol >::bind(), asio::stream_socket_service< Protocol >::cancel(), asio::stream_socket_service< Protocol >::close(), asio::stream_socket_service< Protocol >::connect(), asio::stream_socket_service< Protocol >::construct(), asio::stream_socket_service< Protocol >::destroy(), asio::stream_socket_service< Protocol >::get_option(), asio::stream_socket_service< Protocol >::io_control(), asio::stream_socket_service< Protocol >::is_open(), asio::stream_socket_service< Protocol >::local_endpoint(), asio::stream_socket_service< Protocol >::native(), asio::stream_socket_service< Protocol >::open(), asio::stream_socket_service< Protocol >::receive(), asio::stream_socket_service< Protocol >::remote_endpoint(), asio::stream_socket_service< Protocol >::send(), asio::stream_socket_service< Protocol >::set_option(), and asio::stream_socket_service< Protocol >::shutdown().
1.5.6