Realistic 3D camera system
3D camera system components
Public Types | Public Member Functions | Public Attributes | List of all members
asio::datagram_socket_service< Protocol > Class Template Reference

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

#include <datagram_socket_service.hpp>

Inheritance diagram for asio::datagram_socket_service< Protocol >:
asio::detail::service_base< datagram_socket_service< Protocol > > asio::io_service::service asio::detail::noncopyable

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 datagram socket. 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

 datagram_socket_service (asio::io_service &io_service)
 Construct a new datagram socket service for the specified io_service. More...
 
void construct (implementation_type &impl)
 Construct a new datagram socket implementation. More...
 
void destroy (implementation_type &impl)
 Destroy a datagram socket implementation. More...
 
asio::error_code open (implementation_type &impl, const protocol_type &protocol, asio::error_code &ec)
 
asio::error_code assign (implementation_type &impl, const protocol_type &protocol, const native_handle_type &native_socket, asio::error_code &ec)
 Assign an existing native socket to a datagram 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 datagram 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...
 
asio::error_code cancel (implementation_type &impl, asio::error_code &ec)
 Cancel all asynchronous operations associated with the socket. 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)
 
asio::error_code connect (implementation_type &impl, const endpoint_type &peer_endpoint, asio::error_code &ec)
 Connect the datagram socket to the specified endpoint. More...
 
template<typename ConnectHandler >
 ASIO_INITFN_RESULT_TYPE (ConnectHandler, void(asio::error_code)) async_connect(implementation_type &impl
 Start an asynchronous connect. More...
 
const endpoint_type ASIO_MOVE_ARG (ConnectHandler) handler)
 
template<typename SettableSocketOption >
asio::error_code set_option (implementation_type &impl, const SettableSocketOption &option, asio::error_code &ec)
 Set a socket option. More...
 
template<typename GettableSocketOption >
asio::error_code get_option (const implementation_type &impl, GettableSocketOption &option, asio::error_code &ec) const
 Get a socket option. More...
 
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. More...
 
bool non_blocking (const implementation_type &impl) const
 Gets the non-blocking mode of the socket. More...
 
asio::error_code non_blocking (implementation_type &impl, bool mode, asio::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...
 
asio::error_code native_non_blocking (implementation_type &impl, bool mode, asio::error_code &ec)
 Sets the non-blocking mode of the native socket implementation. 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, socket_base::shutdown_type what, asio::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, asio::error_code &ec)
 Send the given data to the peer. More...
 
template<typename ConstBufferSequence , typename WriteHandler >
 ASIO_INITFN_RESULT_TYPE (WriteHandler, void(asio::error_code, std::size_t)) async_send(implementation_type &impl
 Start an asynchronous send. More...
 
const ConstBufferSequence socket_base::message_flags ASIO_MOVE_ARG (WriteHandler) handler)
 
template<typename ConstBufferSequence >
std::size_t send_to (implementation_type &impl, const ConstBufferSequence &buffers, const endpoint_type &destination, socket_base::message_flags flags, asio::error_code &ec)
 Send a datagram to the specified endpoint. More...
 
template<typename ConstBufferSequence , typename WriteHandler >
 ASIO_INITFN_RESULT_TYPE (WriteHandler, void(asio::error_code, std::size_t)) async_send_to(implementation_type &impl
 Start an asynchronous send. More...
 
const ConstBufferSequence const endpoint_type socket_base::message_flags ASIO_MOVE_ARG (WriteHandler) handler)
 
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. More...
 
template<typename MutableBufferSequence , typename ReadHandler >
 ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_receive(implementation_type &impl
 Start an asynchronous receive. More...
 
const MutableBufferSequence socket_base::message_flags ASIO_MOVE_ARG (ReadHandler) handler)
 
template<typename MutableBufferSequence >
std::size_t receive_from (implementation_type &impl, const MutableBufferSequence &buffers, endpoint_type &sender_endpoint, socket_base::message_flags flags, asio::error_code &ec)
 Receive a datagram with the endpoint of the sender. More...
 
template<typename MutableBufferSequence , typename ReadHandler >
 ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_receive_from(implementation_type &impl
 Start an asynchronous receive that will get the endpoint of the sender. More...
 
const MutableBufferSequence endpoint_type socket_base::message_flags ASIO_MOVE_ARG (ReadHandler) handler)
 
- Public Member Functions inherited from asio::detail::service_base< datagram_socket_service< Protocol > >
 service_base (asio::io_service &io_service)
 
- Public Member Functions inherited from asio::io_service::service
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 ConstBufferSequence const endpoint_typedestination
 
const ConstBufferSequence const endpoint_type socket_base::message_flags flags
 
const MutableBufferSequence & buffers
 
const MutableBufferSequence socket_base::message_flags flags
 
const MutableBufferSequence endpoint_typesender_endpoint
 
const MutableBufferSequence endpoint_type socket_base::message_flags flags
 

Additional Inherited Members

- Static Public Attributes inherited from asio::detail::service_base< datagram_socket_service< Protocol > >
static asio::detail::service_id< datagram_socket_service< Protocol > > id
 
- 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 asio::datagram_socket_service< Protocol >

Default service implementation for a datagram socket.

Definition at line 39 of file datagram_socket_service.hpp.

Member Typedef Documentation

template<typename Protocol >
typedef Protocol::endpoint asio::datagram_socket_service< Protocol >::endpoint_type

The endpoint type.

Definition at line 56 of file datagram_socket_service.hpp.

The type of a datagram socket.

Definition at line 73 of file datagram_socket_service.hpp.

The native socket type.

Definition at line 87 of file datagram_socket_service.hpp.

template<typename Protocol >
typedef service_impl_type::native_handle_type asio::datagram_socket_service< Protocol >::native_type

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

Definition at line 80 of file datagram_socket_service.hpp.

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

The protocol type.

Definition at line 53 of file datagram_socket_service.hpp.

Constructor & Destructor Documentation

template<typename Protocol >
asio::datagram_socket_service< Protocol >::datagram_socket_service ( asio::io_service io_service)
inlineexplicit

Construct a new datagram socket service for the specified io_service.

Definition at line 91 of file datagram_socket_service.hpp.

Member Function Documentation

template<typename Protocol >
template<typename ConnectHandler >
asio::datagram_socket_service< Protocol >::ASIO_INITFN_RESULT_TYPE ( ConnectHandler  ,
void(asio::error_code  
)

Start an asynchronous connect.

template<typename Protocol >
template<typename ConstBufferSequence , typename WriteHandler >
asio::datagram_socket_service< Protocol >::ASIO_INITFN_RESULT_TYPE ( WriteHandler  ,
void(asio::error_code, std::size_t)   
)

Start an asynchronous send.

template<typename Protocol >
template<typename ConstBufferSequence , typename WriteHandler >
asio::datagram_socket_service< Protocol >::ASIO_INITFN_RESULT_TYPE ( WriteHandler  ,
void(asio::error_code, std::size_t)   
)

Start an asynchronous send.

template<typename Protocol >
template<typename MutableBufferSequence , typename ReadHandler >
asio::datagram_socket_service< Protocol >::ASIO_INITFN_RESULT_TYPE ( ReadHandler  ,
void(asio::error_code, std::size_t)   
)

Start an asynchronous receive.

template<typename Protocol >
template<typename MutableBufferSequence , typename ReadHandler >
asio::datagram_socket_service< Protocol >::ASIO_INITFN_RESULT_TYPE ( ReadHandler  ,
void(asio::error_code, std::size_t)   
)

Start an asynchronous receive that will get the endpoint of the sender.

template<typename Protocol >
const endpoint_type asio::datagram_socket_service< Protocol >::ASIO_MOVE_ARG ( ConnectHandler  )
inline

Definition at line 225 of file datagram_socket_service.hpp.

template<typename Protocol >
const ConstBufferSequence socket_base::message_flags asio::datagram_socket_service< Protocol >::ASIO_MOVE_ARG ( WriteHandler  )
inline

Definition at line 322 of file datagram_socket_service.hpp.

template<typename Protocol >
const ConstBufferSequence const endpoint_type socket_base::message_flags asio::datagram_socket_service< Protocol >::ASIO_MOVE_ARG ( WriteHandler  )
inline

Definition at line 349 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence socket_base::message_flags asio::datagram_socket_service< Protocol >::ASIO_MOVE_ARG ( ReadHandler  )
inline

Definition at line 377 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence endpoint_type socket_base::message_flags asio::datagram_socket_service< Protocol >::ASIO_MOVE_ARG ( ReadHandler  )
inline

Definition at line 405 of file datagram_socket_service.hpp.

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

Assign an existing native socket to a datagram socket.

Definition at line 152 of file datagram_socket_service.hpp.

template<typename Protocol >
bool asio::datagram_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 192 of file datagram_socket_service.hpp.

template<typename Protocol >
std::size_t asio::datagram_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 199 of file datagram_socket_service.hpp.

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

Definition at line 206 of file datagram_socket_service.hpp.

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

Cancel all asynchronous operations associated with the socket.

Definition at line 185 of file datagram_socket_service.hpp.

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

Close a datagram socket implementation.

Definition at line 166 of file datagram_socket_service.hpp.

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

Connect the datagram socket to the specified endpoint.

Definition at line 213 of file datagram_socket_service.hpp.

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

Construct a new datagram socket implementation.

Definition at line 99 of file datagram_socket_service.hpp.

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

Destroy a datagram socket implementation.

Definition at line 135 of file datagram_socket_service.hpp.

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

Get a socket option.

Definition at line 246 of file datagram_socket_service.hpp.

template<typename Protocol >
template<typename IoControlCommand >
asio::error_code asio::datagram_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 254 of file datagram_socket_service.hpp.

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

Determine whether the socket is open.

Definition at line 160 of file datagram_socket_service.hpp.

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

Get the local endpoint.

Definition at line 287 of file datagram_socket_service.hpp.

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

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

Definition at line 173 of file datagram_socket_service.hpp.

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

Get the native socket implementation.

Definition at line 179 of file datagram_socket_service.hpp.

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

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

Definition at line 274 of file datagram_socket_service.hpp.

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

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

Definition at line 280 of file datagram_socket_service.hpp.

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

Gets the non-blocking mode of the socket.

Definition at line 261 of file datagram_socket_service.hpp.

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

Sets the non-blocking mode of the socket.

Definition at line 267 of file datagram_socket_service.hpp.

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

Definition at line 141 of file datagram_socket_service.hpp.

template<typename Protocol >
template<typename MutableBufferSequence >
std::size_t asio::datagram_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 363 of file datagram_socket_service.hpp.

template<typename Protocol >
template<typename MutableBufferSequence >
std::size_t asio::datagram_socket_service< Protocol >::receive_from ( implementation_type impl,
const MutableBufferSequence &  buffers,
endpoint_type sender_endpoint,
socket_base::message_flags  flags,
asio::error_code ec 
)
inline

Receive a datagram with the endpoint of the sender.

Definition at line 390 of file datagram_socket_service.hpp.

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

Get the remote endpoint.

Definition at line 294 of file datagram_socket_service.hpp.

template<typename Protocol >
template<typename ConstBufferSequence >
std::size_t asio::datagram_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 309 of file datagram_socket_service.hpp.

template<typename Protocol >
template<typename ConstBufferSequence >
std::size_t asio::datagram_socket_service< Protocol >::send_to ( implementation_type impl,
const ConstBufferSequence &  buffers,
const endpoint_type destination,
socket_base::message_flags  flags,
asio::error_code ec 
)
inline

Send a datagram to the specified endpoint.

Definition at line 335 of file datagram_socket_service.hpp.

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

Set a socket option.

Definition at line 238 of file datagram_socket_service.hpp.

template<typename Protocol >
asio::error_code asio::datagram_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 301 of file datagram_socket_service.hpp.

Member Data Documentation

template<typename Protocol >
const MutableBufferSequence & asio::datagram_socket_service< Protocol >::buffers

Definition at line 320 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence& asio::datagram_socket_service< Protocol >::buffers

Definition at line 375 of file datagram_socket_service.hpp.

template<typename Protocol >
const ConstBufferSequence const endpoint_type& asio::datagram_socket_service< Protocol >::destination

Definition at line 347 of file datagram_socket_service.hpp.

template<typename Protocol >
const ConstBufferSequence socket_base::message_flags asio::datagram_socket_service< Protocol >::flags

Definition at line 320 of file datagram_socket_service.hpp.

template<typename Protocol >
const ConstBufferSequence const endpoint_type socket_base::message_flags asio::datagram_socket_service< Protocol >::flags

Definition at line 347 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence socket_base::message_flags asio::datagram_socket_service< Protocol >::flags

Definition at line 375 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence endpoint_type socket_base::message_flags asio::datagram_socket_service< Protocol >::flags

Definition at line 403 of file datagram_socket_service.hpp.

template<typename Protocol >
const endpoint_type& asio::datagram_socket_service< Protocol >::peer_endpoint

Definition at line 224 of file datagram_socket_service.hpp.

template<typename Protocol >
const MutableBufferSequence endpoint_type& asio::datagram_socket_service< Protocol >::sender_endpoint

Definition at line 403 of file datagram_socket_service.hpp.


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