Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::seq_packet_socket_service< Protocol > Class Template Reference

Default service implementation for a sequenced packet socket. More...

#include <seq_packet_socket_service.hpp>

Inheritance diagram for boost::asio::seq_packet_socket_service< Protocol >:
Collaboration diagram for boost::asio::seq_packet_socket_service< Protocol >:

Public Types

typedef Protocol protocol_type
 The protocol type. More...
 
typedef Protocol::endpoint endpoint_type
 The endpoint type. More...
 
typedef
service_impl_type::implementation_type 
implementation_type
 The type of a sequenced packet socket implementation. More...
 
typedef
service_impl_type::native_handle_type 
native_type
 (Deprecated: Use native_handle_type.) The native socket type. More...
 
typedef
service_impl_type::native_handle_type 
native_handle_type
 The native socket type. More...
 

Public Member Functions

 seq_packet_socket_service (boost::asio::io_service &io_service)
 Construct a new sequenced packet socket service for the specified io_service. More...
 
void construct (implementation_type &impl)
 Construct a new sequenced packet socket implementation. More...
 
void destroy (implementation_type &impl)
 Destroy a sequenced packet socket implementation. More...
 
boost::system::error_code open (implementation_type &impl, const protocol_type &protocol, boost::system::error_code &ec)
 Open a sequenced packet socket. More...
 
boost::system::error_code assign (implementation_type &impl, const protocol_type &protocol, const native_handle_type &native_socket, boost::system::error_code &ec)
 Assign an existing native socket to a sequenced packet socket. More...
 
bool is_open (const implementation_type &impl) const
 Determine whether the socket is open. More...
 
boost::system::error_code close (implementation_type &impl, boost::system::error_code &ec)
 Close a sequenced packet socket implementation. More...
 
native_type native (implementation_type &impl)
 (Deprecated: Use native_handle().) Get the native socket implementation. More...
 
native_handle_type native_handle (implementation_type &impl)
 Get the native socket implementation. More...
 
boost::system::error_code cancel (implementation_type &impl, boost::system::error_code &ec)
 Cancel all asynchronous operations associated with the socket. More...
 
bool at_mark (const implementation_type &impl, boost::system::error_code &ec) const
 Determine whether the socket is at the out-of-band data mark. More...
 
std::size_t available (const implementation_type &impl, boost::system::error_code &ec) const
 Determine the number of bytes available for reading. More...
 
boost::system::error_code bind (implementation_type &impl, const endpoint_type &endpoint, boost::system::error_code &ec)
 Bind the sequenced packet socket to the specified local endpoint. More...
 
boost::system::error_code connect (implementation_type &impl, const endpoint_type &peer_endpoint, boost::system::error_code &ec)
 Connect the sequenced packet socket to the specified endpoint. More...
 
template<typename ConnectHandler >
 BOOST_ASIO_INITFN_RESULT_TYPE (ConnectHandler, void(boost::system::error_code)) async_connect(implementation_type &impl
 Start an asynchronous connect. More...
 
const endpoint_type BOOST_ASIO_MOVE_ARG (ConnectHandler) handler)
 
template<typename SettableSocketOption >
boost::system::error_code set_option (implementation_type &impl, const SettableSocketOption &option, boost::system::error_code &ec)
 Set a socket option. More...
 
template<typename GettableSocketOption >
boost::system::error_code get_option (const implementation_type &impl, GettableSocketOption &option, boost::system::error_code &ec) const
 Get a socket option. More...
 
template<typename IoControlCommand >
boost::system::error_code io_control (implementation_type &impl, IoControlCommand &command, boost::system::error_code &ec)
 Perform an IO control command on the socket. More...
 
bool non_blocking (const implementation_type &impl) const
 Gets the non-blocking mode of the socket. More...
 
boost::system::error_code non_blocking (implementation_type &impl, bool mode, boost::system::error_code &ec)
 Sets the non-blocking mode of the socket. More...
 
bool native_non_blocking (const implementation_type &impl) const
 Gets the non-blocking mode of the native socket implementation. More...
 
boost::system::error_code native_non_blocking (implementation_type &impl, bool mode, boost::system::error_code &ec)
 Sets the non-blocking mode of the native socket implementation. More...
 
endpoint_type local_endpoint (const implementation_type &impl, boost::system::error_code &ec) const
 Get the local endpoint. More...
 
endpoint_type remote_endpoint (const implementation_type &impl, boost::system::error_code &ec) const
 Get the remote endpoint. More...
 
boost::system::error_code shutdown (implementation_type &impl, socket_base::shutdown_type what, boost::system::error_code &ec)
 Disable sends or receives on the socket. More...
 
template<typename ConstBufferSequence >
std::size_t send (implementation_type &impl, const ConstBufferSequence &buffers, socket_base::message_flags flags, boost::system::error_code &ec)
 Send the given data to the peer. More...
 
template<typename ConstBufferSequence , typename WriteHandler >
 BOOST_ASIO_INITFN_RESULT_TYPE (WriteHandler, void(boost::system::error_code, std::size_t)) async_send(implementation_type &impl
 Start an asynchronous send. More...
 
const ConstBufferSequence
socket_base::message_flags 
BOOST_ASIO_MOVE_ARG (WriteHandler) handler)
 
template<typename MutableBufferSequence >
std::size_t receive (implementation_type &impl, const MutableBufferSequence &buffers, socket_base::message_flags in_flags, socket_base::message_flags &out_flags, boost::system::error_code &ec)
 Receive some data from the peer. More...
 
template<typename MutableBufferSequence , typename ReadHandler >
 BOOST_ASIO_INITFN_RESULT_TYPE (ReadHandler, void(boost::system::error_code, std::size_t)) async_receive(implementation_type &impl
 Start an asynchronous receive. More...
 
const MutableBufferSequence
socket_base::message_flags
socket_base::message_flags 
BOOST_ASIO_MOVE_ARG (ReadHandler) handler)
 
boost::asio::io_serviceget_io_service ()
 Get the io_service object that owns the service. More...
 

Public Attributes

const endpoint_typepeer_endpoint
 
const ConstBufferSequence & buffers
 
const ConstBufferSequence
socket_base::message_flags 
flags
 
const MutableBufferSequence & buffers
 
const MutableBufferSequence
socket_base::message_flags 
in_flags
 
const MutableBufferSequence
socket_base::message_flags
socket_base::message_flags
out_flags
 

Static Public Attributes

static
boost::asio::detail::service_id
< seq_packet_socket_service
< Protocol > > 
id
 

Detailed Description

template<typename Protocol>
class boost::asio::seq_packet_socket_service< Protocol >

Default service implementation for a sequenced packet socket.

Member Typedef Documentation

template<typename Protocol >
typedef Protocol::endpoint boost::asio::seq_packet_socket_service< Protocol >::endpoint_type

The endpoint type.

template<typename Protocol >
typedef service_impl_type::implementation_type boost::asio::seq_packet_socket_service< Protocol >::implementation_type

The type of a sequenced packet socket implementation.

template<typename Protocol >
typedef service_impl_type::native_handle_type boost::asio::seq_packet_socket_service< Protocol >::native_handle_type

The native socket type.

template<typename Protocol >
typedef service_impl_type::native_handle_type boost::asio::seq_packet_socket_service< Protocol >::native_type

(Deprecated: Use native_handle_type.) The native socket type.

template<typename Protocol >
typedef Protocol boost::asio::seq_packet_socket_service< Protocol >::protocol_type

The protocol type.

Constructor & Destructor Documentation

template<typename Protocol >
boost::asio::seq_packet_socket_service< Protocol >::seq_packet_socket_service ( boost::asio::io_service io_service)
inlineexplicit

Construct a new sequenced packet socket service for the specified io_service.

Member Function Documentation

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::assign ( implementation_type impl,
const protocol_type protocol,
const native_handle_type native_socket,
boost::system::error_code ec 
)
inline

Assign an existing native socket to a sequenced packet socket.

template<typename Protocol >
bool boost::asio::seq_packet_socket_service< Protocol >::at_mark ( const implementation_type impl,
boost::system::error_code ec 
) const
inline

Determine whether the socket is at the out-of-band data mark.

template<typename Protocol >
std::size_t boost::asio::seq_packet_socket_service< Protocol >::available ( const implementation_type impl,
boost::system::error_code ec 
) const
inline

Determine the number of bytes available for reading.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::bind ( implementation_type impl,
const endpoint_type endpoint,
boost::system::error_code ec 
)
inline

Bind the sequenced packet socket to the specified local endpoint.

template<typename Protocol >
template<typename ConnectHandler >
boost::asio::seq_packet_socket_service< Protocol >::BOOST_ASIO_INITFN_RESULT_TYPE ( ConnectHandler  ,
void(boost::system::error_code  
)

Start an asynchronous connect.

template<typename Protocol >
template<typename ConstBufferSequence , typename WriteHandler >
boost::asio::seq_packet_socket_service< Protocol >::BOOST_ASIO_INITFN_RESULT_TYPE ( WriteHandler  ,
void(boost::system::error_code, std::size_t)   
)

Start an asynchronous send.

template<typename Protocol >
template<typename MutableBufferSequence , typename ReadHandler >
boost::asio::seq_packet_socket_service< Protocol >::BOOST_ASIO_INITFN_RESULT_TYPE ( ReadHandler  ,
void(boost::system::error_code, std::size_t)   
)

Start an asynchronous receive.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::cancel ( implementation_type impl,
boost::system::error_code ec 
)
inline

Cancel all asynchronous operations associated with the socket.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::close ( implementation_type impl,
boost::system::error_code ec 
)
inline

Close a sequenced packet socket implementation.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::connect ( implementation_type impl,
const endpoint_type peer_endpoint,
boost::system::error_code ec 
)
inline

Connect the sequenced packet socket to the specified endpoint.

template<typename Protocol >
void boost::asio::seq_packet_socket_service< Protocol >::construct ( implementation_type impl)
inline

Construct a new sequenced packet socket implementation.

template<typename Protocol >
void boost::asio::seq_packet_socket_service< Protocol >::destroy ( implementation_type impl)
inline

Destroy a sequenced packet socket implementation.

boost::asio::io_service& boost::asio::io_service::service::get_io_service ( )
inherited

Get the io_service object that owns the service.

template<typename Protocol >
template<typename GettableSocketOption >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::get_option ( const implementation_type impl,
GettableSocketOption &  option,
boost::system::error_code ec 
) const
inline

Get a socket option.

template<typename Protocol >
template<typename IoControlCommand >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::io_control ( implementation_type impl,
IoControlCommand &  command,
boost::system::error_code ec 
)
inline

Perform an IO control command on the socket.

template<typename Protocol >
bool boost::asio::seq_packet_socket_service< Protocol >::is_open ( const implementation_type impl) const
inline

Determine whether the socket is open.

template<typename Protocol >
endpoint_type boost::asio::seq_packet_socket_service< Protocol >::local_endpoint ( const implementation_type impl,
boost::system::error_code ec 
) const
inline

Get the local endpoint.

template<typename Protocol >
native_type boost::asio::seq_packet_socket_service< Protocol >::native ( implementation_type impl)
inline

(Deprecated: Use native_handle().) Get the native socket implementation.

template<typename Protocol >
native_handle_type boost::asio::seq_packet_socket_service< Protocol >::native_handle ( implementation_type impl)
inline

Get the native socket implementation.

template<typename Protocol >
bool boost::asio::seq_packet_socket_service< Protocol >::native_non_blocking ( const implementation_type impl) const
inline

Gets the non-blocking mode of the native socket implementation.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::native_non_blocking ( implementation_type impl,
bool  mode,
boost::system::error_code ec 
)
inline

Sets the non-blocking mode of the native socket implementation.

template<typename Protocol >
bool boost::asio::seq_packet_socket_service< Protocol >::non_blocking ( const implementation_type impl) const
inline

Gets the non-blocking mode of the socket.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::non_blocking ( implementation_type impl,
bool  mode,
boost::system::error_code ec 
)
inline

Sets the non-blocking mode of the socket.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::open ( implementation_type impl,
const protocol_type protocol,
boost::system::error_code ec 
)
inline

Open a sequenced packet socket.

References boost::asio::error::invalid_argument.

template<typename Protocol >
template<typename MutableBufferSequence >
std::size_t boost::asio::seq_packet_socket_service< Protocol >::receive ( implementation_type impl,
const MutableBufferSequence &  buffers,
socket_base::message_flags  in_flags,
socket_base::message_flags out_flags,
boost::system::error_code ec 
)
inline

Receive some data from the peer.

template<typename Protocol >
endpoint_type boost::asio::seq_packet_socket_service< Protocol >::remote_endpoint ( const implementation_type impl,
boost::system::error_code ec 
) const
inline

Get the remote endpoint.

template<typename Protocol >
template<typename ConstBufferSequence >
std::size_t boost::asio::seq_packet_socket_service< Protocol >::send ( implementation_type impl,
const ConstBufferSequence &  buffers,
socket_base::message_flags  flags,
boost::system::error_code ec 
)
inline

Send the given data to the peer.

template<typename Protocol >
template<typename SettableSocketOption >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::set_option ( implementation_type impl,
const SettableSocketOption &  option,
boost::system::error_code ec 
)
inline

Set a socket option.

template<typename Protocol >
boost::system::error_code boost::asio::seq_packet_socket_service< Protocol >::shutdown ( implementation_type impl,
socket_base::shutdown_type  what,
boost::system::error_code ec 
)
inline

Disable sends or receives on the socket.

Member Data Documentation

template<typename Protocol >
const ConstBufferSequence& boost::asio::seq_packet_socket_service< Protocol >::buffers
template<typename Protocol >
const MutableBufferSequence& boost::asio::seq_packet_socket_service< Protocol >::buffers
template<typename Protocol >
const ConstBufferSequence socket_base::message_flags boost::asio::seq_packet_socket_service< Protocol >::flags
template<typename Protocol >
const MutableBufferSequence socket_base::message_flags boost::asio::seq_packet_socket_service< Protocol >::in_flags
template<typename Protocol >
const MutableBufferSequence socket_base::message_flags socket_base::message_flags& boost::asio::seq_packet_socket_service< Protocol >::out_flags
template<typename Protocol >
const endpoint_type& boost::asio::seq_packet_socket_service< Protocol >::peer_endpoint

The documentation for this class was generated from the following file: