Realistic 3D camera system
3D camera system components
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
services::stream_socket_service< Protocol > Class Template Reference

Debugging stream socket service that wraps the normal stream socket service. More...

#include <stream_socket_service.hpp>

Inheritance diagram for services::stream_socket_service< Protocol >:
asio::io_service::service asio::detail::noncopyable

Classes

class  connect_handler
 Handler to wrap asynchronous connect completion. More...
 
class  receive_handler
 Handler to wrap asynchronous receive completion. More...
 
class  send_handler
 Handler to wrap asynchronous send completion. More...
 

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 implementation type of a stream socket. More...
 
typedef service_impl_type::native_handle_type native_handle_type
 The native type of a stream socket. More...
 

Public Member Functions

 stream_socket_service (asio::io_service &io_service)
 Construct a new stream socket service for the specified io_service. More...
 
void shutdown_service ()
 Destroy all user-defined handler objects owned by the service. More...
 
void construct (implementation_type &impl)
 Construct a new stream socket implementation. More...
 
void destroy (implementation_type &impl)
 Destroy a stream socket implementation. More...
 
asio::error_code open (implementation_type &impl, const protocol_type &protocol, asio::error_code &ec)
 Open a new stream socket implementation. More...
 
asio::error_code assign (implementation_type &impl, const protocol_type &protocol, const native_handle_type &native_socket, asio::error_code &ec)
 Open a stream socket from an existing native socket. More...
 
bool is_open (const implementation_type &impl) const
 Determine whether the socket is open. More...
 
asio::error_code close (implementation_type &impl, asio::error_code &ec)
 Close a stream socket implementation. More...
 
bool at_mark (const implementation_type &impl, asio::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, asio::error_code &ec) const
 Determine the number of bytes available for reading. More...
 
asio::error_code bind (implementation_type &impl, const endpoint_type &endpoint, asio::error_code &ec)
 Bind the stream socket to the specified local endpoint. More...
 
asio::error_code connect (implementation_type &impl, const endpoint_type &peer_endpoint, asio::error_code &ec)
 Connect the stream socket to the specified endpoint. More...
 
template<typename Handler >
void async_connect (implementation_type &impl, const endpoint_type &peer_endpoint, Handler handler)
 Start an asynchronous connect. More...
 
template<typename Option >
asio::error_code set_option (implementation_type &impl, const Option &option, asio::error_code &ec)
 Set a socket option. More...
 
template<typename Option >
asio::error_code get_option (const implementation_type &impl, Option &option, asio::error_code &ec) const
 Get a socket option. More...
 
template<typename IO_Control_Command >
asio::error_code io_control (implementation_type &impl, IO_Control_Command &command, asio::error_code &ec)
 Perform an IO control command on the socket. More...
 
endpoint_type local_endpoint (const implementation_type &impl, asio::error_code &ec) const
 Get the local endpoint. More...
 
endpoint_type remote_endpoint (const implementation_type &impl, asio::error_code &ec) const
 Get the remote endpoint. More...
 
asio::error_code shutdown (implementation_type &impl, asio::socket_base::shutdown_type what, asio::error_code &ec)
 Disable sends or receives on the socket. More...
 
template<typename Const_Buffers >
std::size_t send (implementation_type &impl, const Const_Buffers &buffers, asio::socket_base::message_flags flags, asio::error_code &ec)
 Send the given data to the peer. More...
 
template<typename Const_Buffers , typename Handler >
void async_send (implementation_type &impl, const Const_Buffers &buffers, asio::socket_base::message_flags flags, Handler handler)
 Start an asynchronous send. More...
 
template<typename Mutable_Buffers >
std::size_t receive (implementation_type &impl, const Mutable_Buffers &buffers, asio::socket_base::message_flags flags, asio::error_code &ec)
 Receive some data from the peer. More...
 
template<typename Mutable_Buffers , typename Handler >
void async_receive (implementation_type &impl, const Mutable_Buffers &buffers, asio::socket_base::message_flags flags, Handler handler)
 Start an asynchronous receive. More...
 
- Public Member Functions inherited from asio::io_service::service
asio::io_serviceget_io_service ()
 Get the io_service object that owns the service. More...
 

Static Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from asio::io_service::service
ASIO_DECL service (asio::io_service &owner)
 Constructor. More...
 
virtual ASIO_DECL ~service ()
 Destructor. More...
 

Detailed Description

template<typename Protocol>
class services::stream_socket_service< Protocol >

Debugging stream socket service that wraps the normal stream socket service.

Definition at line 23 of file stream_socket_service.hpp.

Member Typedef Documentation

template<typename Protocol>
typedef Protocol::endpoint services::stream_socket_service< Protocol >::endpoint_type

The endpoint type.

Definition at line 38 of file stream_socket_service.hpp.

The implementation type of a stream socket.

Definition at line 41 of file stream_socket_service.hpp.

The native type of a stream socket.

Definition at line 44 of file stream_socket_service.hpp.

template<typename Protocol>
typedef Protocol services::stream_socket_service< Protocol >::protocol_type

The protocol type.

Definition at line 35 of file stream_socket_service.hpp.

Constructor & Destructor Documentation

template<typename Protocol>
services::stream_socket_service< Protocol >::stream_socket_service ( asio::io_service io_service)
inlineexplicit

Construct a new stream socket service for the specified io_service.

Definition at line 47 of file stream_socket_service.hpp.

Member Function Documentation

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

Open a stream socket from an existing native socket.

Definition at line 80 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Handler >
void services::stream_socket_service< Protocol >::async_connect ( implementation_type impl,
const endpoint_type peer_endpoint,
Handler  handler 
)
inline

Start an asynchronous connect.

Definition at line 170 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Mutable_Buffers , typename Handler >
void services::stream_socket_service< Protocol >::async_receive ( implementation_type impl,
const Mutable_Buffers &  buffers,
asio::socket_base::message_flags  flags,
Handler  handler 
)
inline

Start an asynchronous receive.

Definition at line 330 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Const_Buffers , typename Handler >
void services::stream_socket_service< Protocol >::async_send ( implementation_type impl,
const Const_Buffers &  buffers,
asio::socket_base::message_flags  flags,
Handler  handler 
)
inline

Start an asynchronous send.

Definition at line 276 of file stream_socket_service.hpp.

template<typename Protocol>
bool services::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 104 of file stream_socket_service.hpp.

template<typename Protocol>
std::size_t services::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 112 of file stream_socket_service.hpp.

template<typename Protocol>
asio::error_code services::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 120 of file stream_socket_service.hpp.

template<typename Protocol>
asio::error_code services::stream_socket_service< Protocol >::close ( implementation_type impl,
asio::error_code ec 
)
inline

Close a stream socket implementation.

Definition at line 96 of file stream_socket_service.hpp.

template<typename Protocol>
asio::error_code services::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 128 of file stream_socket_service.hpp.

template<typename Protocol>
void services::stream_socket_service< Protocol >::construct ( implementation_type impl)
inline

Construct a new stream socket implementation.

Definition at line 60 of file stream_socket_service.hpp.

template<typename Protocol>
void services::stream_socket_service< Protocol >::destroy ( implementation_type impl)
inline

Destroy a stream socket implementation.

Definition at line 66 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Option >
asio::error_code services::stream_socket_service< Protocol >::get_option ( const implementation_type impl,
Option &  option,
asio::error_code ec 
) const
inline

Get a socket option.

Definition at line 190 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename IO_Control_Command >
asio::error_code services::stream_socket_service< Protocol >::io_control ( implementation_type impl,
IO_Control_Command &  command,
asio::error_code ec 
)
inline

Perform an IO control command on the socket.

Definition at line 199 of file stream_socket_service.hpp.

template<typename Protocol>
bool services::stream_socket_service< Protocol >::is_open ( const implementation_type impl) const
inline

Determine whether the socket is open.

Definition at line 89 of file stream_socket_service.hpp.

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

Get the local endpoint.

Definition at line 207 of file stream_socket_service.hpp.

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

Open a new stream socket implementation.

Definition at line 72 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Mutable_Buffers >
std::size_t services::stream_socket_service< Protocol >::receive ( implementation_type impl,
const Mutable_Buffers &  buffers,
asio::socket_base::message_flags  flags,
asio::error_code ec 
)
inline

Receive some data from the peer.

Definition at line 286 of file stream_socket_service.hpp.

template<typename Protocol>
endpoint_type services::stream_socket_service< Protocol >::remote_endpoint ( const implementation_type impl,
asio::error_code ec 
) const
inline

Get the remote endpoint.

Definition at line 215 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Const_Buffers >
std::size_t services::stream_socket_service< Protocol >::send ( implementation_type impl,
const Const_Buffers &  buffers,
asio::socket_base::message_flags  flags,
asio::error_code ec 
)
inline

Send the given data to the peer.

Definition at line 233 of file stream_socket_service.hpp.

template<typename Protocol>
template<typename Option >
asio::error_code services::stream_socket_service< Protocol >::set_option ( implementation_type impl,
const Option &  option,
asio::error_code ec 
)
inline

Set a socket option.

Definition at line 181 of file stream_socket_service.hpp.

template<typename Protocol>
asio::error_code services::stream_socket_service< Protocol >::shutdown ( implementation_type impl,
asio::socket_base::shutdown_type  what,
asio::error_code ec 
)
inline

Disable sends or receives on the socket.

Definition at line 223 of file stream_socket_service.hpp.

template<typename Protocol>
void services::stream_socket_service< Protocol >::shutdown_service ( )
inlinevirtual

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

Implements asio::io_service::service.

Definition at line 55 of file stream_socket_service.hpp.

Member Data Documentation

template<typename Protocol>
asio::io_service::id services::stream_socket_service< Protocol >::id
static

The unique service identifier.

Definition at line 32 of file stream_socket_service.hpp.


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