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

Default service implementation for a socket acceptor. More...

#include <socket_acceptor_service.hpp>

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

Public Types

typedef Protocol protocol_type
 The protocol type. More...
 
typedef protocol_type::endpoint endpoint_type
 The endpoint type. More...
 
typedef
service_impl_type::implementation_type 
implementation_type
 The native type of the socket acceptor. More...
 
typedef
service_impl_type::native_handle_type 
native_type
 (Deprecated: Use native_handle_type.) The native acceptor type. More...
 
typedef
service_impl_type::native_handle_type 
native_handle_type
 The native acceptor type. More...
 

Public Member Functions

 socket_acceptor_service (boost::asio::io_service &io_service)
 Construct a new socket acceptor service for the specified io_service. More...
 
void construct (implementation_type &impl)
 Construct a new socket acceptor implementation. More...
 
void destroy (implementation_type &impl)
 Destroy a socket acceptor implementation. More...
 
boost::system::error_code open (implementation_type &impl, const protocol_type &protocol, boost::system::error_code &ec)
 Open a new socket acceptor implementation. More...
 
boost::system::error_code assign (implementation_type &impl, const protocol_type &protocol, const native_handle_type &native_acceptor, boost::system::error_code &ec)
 Assign an existing native acceptor to a socket acceptor. More...
 
bool is_open (const implementation_type &impl) const
 Determine whether the acceptor is open. More...
 
boost::system::error_code cancel (implementation_type &impl, boost::system::error_code &ec)
 Cancel all asynchronous operations associated with the acceptor. More...
 
boost::system::error_code bind (implementation_type &impl, const endpoint_type &endpoint, boost::system::error_code &ec)
 Bind the socket acceptor to the specified local endpoint. More...
 
boost::system::error_code listen (implementation_type &impl, int backlog, boost::system::error_code &ec)
 Place the socket acceptor into the state where it will listen for new connections. More...
 
boost::system::error_code close (implementation_type &impl, boost::system::error_code &ec)
 Close a socket acceptor implementation. More...
 
native_type native (implementation_type &impl)
 (Deprecated: Use native_handle().) Get the native acceptor implementation. More...
 
native_handle_type native_handle (implementation_type &impl)
 Get the native acceptor implementation. More...
 
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 acceptor. More...
 
boost::system::error_code non_blocking (implementation_type &impl, bool mode, boost::system::error_code &ec)
 Sets the non-blocking mode of the acceptor. More...
 
bool native_non_blocking (const implementation_type &impl) const
 Gets the non-blocking mode of the native acceptor 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 acceptor implementation. More...
 
endpoint_type local_endpoint (const implementation_type &impl, boost::system::error_code &ec) const
 Get the local endpoint. More...
 
template<typename Protocol1 , typename SocketService >
boost::system::error_code accept (implementation_type &impl, basic_socket< Protocol1, SocketService > &peer, endpoint_type *peer_endpoint, boost::system::error_code &ec, typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type *=0)
 Accept a new connection. More...
 
template<typename Protocol1 , typename SocketService , typename AcceptHandler >
 BOOST_ASIO_INITFN_RESULT_TYPE (AcceptHandler, void(boost::system::error_code)) async_accept(implementation_type &impl
 Start an asynchronous accept. More...
 
basic_socket< Protocol1,
SocketService > endpoint_type 
BOOST_ASIO_MOVE_ARG (AcceptHandler) handler
 
boost::asio::io_serviceget_io_service ()
 Get the io_service object that owns the service. More...
 

Public Attributes

basic_socket< Protocol1,
SocketService > & 
peer
 
basic_socket< Protocol1,
SocketService > endpoint_type
peer_endpoint
 

Static Public Attributes

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

Detailed Description

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

Default service implementation for a socket acceptor.

Member Typedef Documentation

template<typename Protocol >
typedef protocol_type::endpoint boost::asio::socket_acceptor_service< Protocol >::endpoint_type

The endpoint type.

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

The native type of the socket acceptor.

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

The native acceptor type.

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

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

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

The protocol type.

Constructor & Destructor Documentation

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

Construct a new socket acceptor service for the specified io_service.

Member Function Documentation

template<typename Protocol >
template<typename Protocol1 , typename SocketService >
boost::system::error_code boost::asio::socket_acceptor_service< Protocol >::accept ( implementation_type impl,
basic_socket< Protocol1, SocketService > &  peer,
endpoint_type peer_endpoint,
boost::system::error_code ec,
typename enable_if< is_convertible< Protocol, Protocol1 >::value >::type = 0 
)
inline

Accept a new connection.

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

Assign an existing native acceptor to a socket acceptor.

References boost::system::error_code::assign().

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

Bind the socket acceptor to the specified local endpoint.

template<typename Protocol >
template<typename Protocol1 , typename SocketService , typename AcceptHandler >
boost::asio::socket_acceptor_service< Protocol >::BOOST_ASIO_INITFN_RESULT_TYPE ( AcceptHandler  ,
void(boost::system::error_code  
)

Start an asynchronous accept.

template<typename Protocol >
basic_socket<Protocol1, SocketService> endpoint_type boost::asio::socket_acceptor_service< Protocol >::BOOST_ASIO_MOVE_ARG ( AcceptHandler  )
template<typename Protocol >
boost::system::error_code boost::asio::socket_acceptor_service< Protocol >::cancel ( implementation_type impl,
boost::system::error_code ec 
)
inline

Cancel all asynchronous operations associated with the acceptor.

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

Close a socket acceptor implementation.

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

Construct a new socket acceptor implementation.

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

Destroy a socket acceptor 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::socket_acceptor_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::socket_acceptor_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::socket_acceptor_service< Protocol >::is_open ( const implementation_type impl) const
inline

Determine whether the acceptor is open.

template<typename Protocol >
boost::system::error_code boost::asio::socket_acceptor_service< Protocol >::listen ( implementation_type impl,
int  backlog,
boost::system::error_code ec 
)
inline

Place the socket acceptor into the state where it will listen for new connections.

template<typename Protocol >
endpoint_type boost::asio::socket_acceptor_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::socket_acceptor_service< Protocol >::native ( implementation_type impl)
inline

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

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

Get the native acceptor implementation.

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

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

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

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

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

Gets the non-blocking mode of the acceptor.

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

Sets the non-blocking mode of the acceptor.

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

Open a new socket acceptor implementation.

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

Set a socket option.

Member Data Documentation

template<typename Protocol >
basic_socket<Protocol1, SocketService>& boost::asio::socket_acceptor_service< Protocol >::peer
template<typename Protocol >
basic_socket<Protocol1, SocketService> endpoint_type* boost::asio::socket_acceptor_service< Protocol >::peer_endpoint

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