asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design
Reference Class Hierarchy | Class Index | Member Index

asio::socket_acceptor_service< Protocol > Class Template Reference

Inherits asio::io_service::service.

Inheritance diagram for asio::socket_acceptor_service< Protocol >:

Inheritance graph
List of all members.

Detailed Description

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

Default service implementation for a socket acceptor.


Public Types

typedef Protocol protocol_type
 The protocol type.
typedef protocol_type::endpoint endpoint_type
 The endpoint type.
typedef implementation_defined implementation_type
 The native type of the socket acceptor.
typedef implementation_defined native_type
 The native acceptor type.

Public Member Functions

 socket_acceptor_service (asio::io_service &io_service)
 Construct a new socket acceptor 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 socket acceptor implementation.
void destroy (implementation_type &impl)
 Destroy a socket acceptor implementation.
asio::error_code open (implementation_type &impl, const protocol_type &protocol, asio::error_code &ec)
 Open a new socket acceptor implementation.
asio::error_code assign (implementation_type &impl, const protocol_type &protocol, const native_type &native_acceptor, asio::error_code &ec)
 Assign an existing native acceptor to a socket acceptor.
bool is_open (const implementation_type &impl) const
 Determine whether the acceptor is open.
asio::error_code cancel (implementation_type &impl, asio::error_code &ec)
 Cancel all asynchronous operations associated with the acceptor.
asio::error_code bind (implementation_type &impl, const endpoint_type &endpoint, asio::error_code &ec)
 Bind the socket acceptor to the specified local endpoint.
asio::error_code listen (implementation_type &impl, int backlog, asio::error_code &ec)
 Place the socket acceptor into the state where it will listen for new connections.
asio::error_code close (implementation_type &impl, asio::error_code &ec)
 Close a socket acceptor implementation.
native_type native (implementation_type &impl)
 Get the native acceptor implementation.
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.
template<typename SocketService>
asio::error_code accept (implementation_type &impl, basic_socket< protocol_type, SocketService > &peer, endpoint_type *peer_endpoint, asio::error_code &ec)
 Accept a new connection.
template<typename SocketService, typename AcceptHandler>
void async_accept (implementation_type &impl, basic_socket< protocol_type, SocketService > &peer, endpoint_type *peer_endpoint, AcceptHandler handler)
 Start an asynchronous accept.
asio::io_serviceio_service ()
 Get the io_service object that owns the service.

Static Public Attributes

static asio::io_service::id id
 The unique service identifier.


Member Typedef Documentation

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

The protocol type.

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

The endpoint type.

template<typename Protocol>
typedef implementation_defined asio::socket_acceptor_service< Protocol >::implementation_type

The native type of the socket acceptor.

template<typename Protocol>
typedef implementation_defined asio::socket_acceptor_service< Protocol >::native_type

The native acceptor type.


Constructor & Destructor Documentation

template<typename Protocol>
asio::socket_acceptor_service< Protocol >::socket_acceptor_service ( asio::io_service io_service  )  [explicit]

Construct a new socket acceptor service for the specified io_service.


Member Function Documentation

template<typename Protocol>
void asio::socket_acceptor_service< Protocol >::shutdown_service (  )  [virtual]

Destroy all user-defined handler objects owned by the service.

Implements asio::io_service::service.

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

Construct a new socket acceptor implementation.

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

Destroy a socket acceptor implementation.

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

Open a new socket acceptor implementation.

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

Assign an existing native acceptor to a socket acceptor.

template<typename Protocol>
bool asio::socket_acceptor_service< Protocol >::is_open ( const implementation_type impl  )  const

Determine whether the acceptor is open.

template<typename Protocol>
asio::error_code asio::socket_acceptor_service< Protocol >::cancel ( implementation_type impl,
asio::error_code ec 
)

Cancel all asynchronous operations associated with the acceptor.

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

Bind the socket acceptor to the specified local endpoint.

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

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

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

Close a socket acceptor implementation.

template<typename Protocol>
native_type asio::socket_acceptor_service< Protocol >::native ( implementation_type impl  ) 

Get the native acceptor implementation.

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

Set a socket option.

template<typename Protocol>
template<typename GettableSocketOption>
asio::error_code asio::socket_acceptor_service< Protocol >::get_option ( const implementation_type impl,
GettableSocketOption &  option,
asio::error_code ec 
) const

Get a socket option.

template<typename Protocol>
template<typename IoControlCommand>
asio::error_code asio::socket_acceptor_service< Protocol >::io_control ( implementation_type impl,
IoControlCommand &  command,
asio::error_code ec 
)

Perform an IO control command on the socket.

template<typename Protocol>
endpoint_type asio::socket_acceptor_service< Protocol >::local_endpoint ( const implementation_type impl,
asio::error_code ec 
) const

Get the local endpoint.

template<typename Protocol>
template<typename SocketService>
asio::error_code asio::socket_acceptor_service< Protocol >::accept ( implementation_type impl,
basic_socket< protocol_type, SocketService > &  peer,
endpoint_type peer_endpoint,
asio::error_code ec 
)

Accept a new connection.

template<typename Protocol>
template<typename SocketService, typename AcceptHandler>
void asio::socket_acceptor_service< Protocol >::async_accept ( implementation_type impl,
basic_socket< protocol_type, SocketService > &  peer,
endpoint_type peer_endpoint,
AcceptHandler  handler 
)

Start an asynchronous accept.

asio::io_service & asio::io_service::service::io_service (  )  [inherited]

Get the io_service object that owns the service.


Member Data Documentation

template<typename Protocol>
asio::io_service::id asio::socket_acceptor_service< Protocol >::id [static]

The unique service identifier.

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design