Realistic 3D camera system
3D camera system components
|
Provides sequenced packet socket functionality. More...
#include <basic_seq_packet_socket.hpp>
Public Types | |
typedef SeqPacketSocketService::native_handle_type | native_type |
typedef SeqPacketSocketService::native_handle_type | native_handle_type |
The native representation of a socket. More... | |
typedef Protocol | protocol_type |
The protocol type. More... | |
typedef Protocol::endpoint | endpoint_type |
The endpoint type. More... | |
Public Types inherited from asio::basic_socket< Protocol, SeqPacketSocketService > | |
typedef SeqPacketSocketService::native_handle_type | native_type |
typedef SeqPacketSocketService::native_handle_type | native_handle_type |
The native representation of a socket. More... | |
typedef Protocol | protocol_type |
The protocol type. More... | |
typedef Protocol::endpoint | endpoint_type |
The endpoint type. More... | |
typedef basic_socket< Protocol, SeqPacketSocketService > | lowest_layer_type |
A basic_socket is always the lowest layer. More... | |
Public Types inherited from asio::basic_io_object< SeqPacketSocketService > | |
typedef SeqPacketSocketService | service_type |
The type of the service that will be used to provide I/O operations. More... | |
typedef service_type::implementation_type | implementation_type |
The underlying implementation type of I/O object. More... | |
Public Types inherited from asio::socket_base | |
enum | shutdown_type { shutdown_receive = ASIO_OS_DEF(SHUT_RD), shutdown_send = ASIO_OS_DEF(SHUT_WR), shutdown_both = ASIO_OS_DEF(SHUT_RDWR) } |
Different ways a socket may be shutdown. More... | |
typedef int | message_flags |
Bitmask type for flags that can be passed to send and receive operations. More... | |
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_BROADCAST)> | broadcast |
Socket option to permit sending of broadcast messages. More... | |
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_DEBUG)> | debug |
Socket option to enable socket-level debugging. More... | |
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_DONTROUTE)> | do_not_route |
Socket option to prevent routing, use local interfaces only. More... | |
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_KEEPALIVE)> | keep_alive |
Socket option to send keep-alives. More... | |
typedef asio::detail::socket_option::integer< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_SNDBUF)> | send_buffer_size |
Socket option for the send buffer size of a socket. More... | |
typedef asio::detail::socket_option::integer< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_SNDLOWAT)> | send_low_watermark |
Socket option for the send low watermark. More... | |
typedef asio::detail::socket_option::integer< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_RCVBUF)> | receive_buffer_size |
Socket option for the receive buffer size of a socket. More... | |
typedef asio::detail::socket_option::integer< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_RCVLOWAT)> | receive_low_watermark |
Socket option for the receive low watermark. More... | |
typedef asio::detail::socket_option::boolean< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_REUSEADDR)> | reuse_address |
typedef asio::detail::socket_option::linger< ASIO_OS_DEF(SOL_SOCKET), ASIO_OS_DEF(SO_LINGER)> | linger |
typedef asio::detail::socket_option::boolean< asio::detail::custom_socket_option_level, asio::detail::enable_connection_aborted_option > | enable_connection_aborted |
Socket option to report aborted connections on accept. More... | |
typedef asio::detail::io_control::non_blocking_io | non_blocking_io |
typedef asio::detail::io_control::bytes_readable | bytes_readable |
Public Member Functions | |
basic_seq_packet_socket (asio::io_service &io_service) | |
Construct a basic_seq_packet_socket without opening it. More... | |
basic_seq_packet_socket (asio::io_service &io_service, const protocol_type &protocol) | |
Construct and open a basic_seq_packet_socket. More... | |
basic_seq_packet_socket (asio::io_service &io_service, const endpoint_type &endpoint) | |
basic_seq_packet_socket (asio::io_service &io_service, const protocol_type &protocol, const native_handle_type &native_socket) | |
Construct a basic_seq_packet_socket on an existing native socket. More... | |
template<typename ConstBufferSequence > | |
std::size_t | send (const ConstBufferSequence &buffers, socket_base::message_flags flags) |
Send some data on the socket. More... | |
template<typename ConstBufferSequence > | |
std::size_t | send (const ConstBufferSequence &buffers, socket_base::message_flags flags, asio::error_code &ec) |
Send some data on the socket. More... | |
template<typename ConstBufferSequence , typename WriteHandler > | |
ASIO_INITFN_RESULT_TYPE (WriteHandler, void(asio::error_code, std::size_t)) async_send(const ConstBufferSequence &buffers | |
Start an asynchronous send. More... | |
socket_base::message_flags | ASIO_MOVE_ARG (WriteHandler) handler) |
template<typename MutableBufferSequence > | |
std::size_t | receive (const MutableBufferSequence &buffers, socket_base::message_flags &out_flags) |
Receive some data on the socket. More... | |
template<typename MutableBufferSequence > | |
std::size_t | receive (const MutableBufferSequence &buffers, socket_base::message_flags in_flags, socket_base::message_flags &out_flags) |
Receive some data on the socket. More... | |
template<typename MutableBufferSequence > | |
std::size_t | receive (const MutableBufferSequence &buffers, socket_base::message_flags in_flags, socket_base::message_flags &out_flags, asio::error_code &ec) |
Receive some data on a connected socket. More... | |
template<typename MutableBufferSequence , typename ReadHandler > | |
ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_receive(const MutableBufferSequence &buffers | |
Start an asynchronous receive. More... | |
socket_base::message_flags | ASIO_MOVE_ARG (ReadHandler) handler) |
template<typename MutableBufferSequence , typename ReadHandler > | |
ASIO_INITFN_RESULT_TYPE (ReadHandler, void(asio::error_code, std::size_t)) async_receive(const MutableBufferSequence &buffers | |
Start an asynchronous receive. More... | |
socket_base::message_flags socket_base::message_flags | ASIO_MOVE_ARG (ReadHandler) handler) |
Public Member Functions inherited from asio::basic_socket< Protocol, SeqPacketSocketService > | |
basic_socket (asio::io_service &io_service) | |
Construct a basic_socket without opening it. More... | |
basic_socket (asio::io_service &io_service, const protocol_type &protocol) | |
Construct and open a basic_socket. More... | |
basic_socket (asio::io_service &io_service, const endpoint_type &endpoint) | |
basic_socket (asio::io_service &io_service, const protocol_type &protocol, const native_handle_type &native_socket) | |
Construct a basic_socket on an existing native socket. More... | |
lowest_layer_type & | lowest_layer () |
Get a reference to the lowest layer. More... | |
const lowest_layer_type & | lowest_layer () const |
Get a const reference to the lowest layer. More... | |
void | open (const protocol_type &protocol=protocol_type()) |
Open the socket using the specified protocol. More... | |
asio::error_code | open (const protocol_type &protocol, asio::error_code &ec) |
Open the socket using the specified protocol. More... | |
void | assign (const protocol_type &protocol, const native_handle_type &native_socket) |
Assign an existing native socket to the socket. More... | |
asio::error_code | assign (const protocol_type &protocol, const native_handle_type &native_socket, asio::error_code &ec) |
Assign an existing native socket to the socket. More... | |
bool | is_open () const |
Determine whether the socket is open. More... | |
void | close () |
Close the socket. More... | |
asio::error_code | close (asio::error_code &ec) |
Close the socket. More... | |
native_type | native () |
(Deprecated: Use native_handle().) Get the native socket representation. More... | |
native_handle_type | native_handle () |
Get the native socket representation. More... | |
void | cancel () |
Cancel all asynchronous operations associated with the socket. More... | |
asio::error_code | cancel (asio::error_code &ec) |
Cancel all asynchronous operations associated with the socket. More... | |
bool | at_mark () const |
Determine whether the socket is at the out-of-band data mark. More... | |
bool | at_mark (asio::error_code &ec) const |
Determine whether the socket is at the out-of-band data mark. More... | |
std::size_t | available () const |
Determine the number of bytes available for reading. More... | |
std::size_t | available (asio::error_code &ec) const |
Determine the number of bytes available for reading. More... | |
void | bind (const endpoint_type &endpoint) |
Bind the socket to the given local endpoint. More... | |
asio::error_code | bind (const endpoint_type &endpoint, asio::error_code &ec) |
Bind the socket to the given local endpoint. More... | |
void | connect (const endpoint_type &peer_endpoint) |
Connect the socket to the specified endpoint. More... | |
asio::error_code | connect (const endpoint_type &peer_endpoint, asio::error_code &ec) |
Connect the socket to the specified endpoint. More... | |
ASIO_INITFN_RESULT_TYPE (ConnectHandler, void(asio::error_code)) async_connect(const endpoint_type &peer_endpoint | |
Start an asynchronous connect. More... | |
ASIO_MOVE_ARG (ConnectHandler) handler) | |
void | set_option (const SettableSocketOption &option) |
Set an option on the socket. More... | |
asio::error_code | set_option (const SettableSocketOption &option, asio::error_code &ec) |
Set an option on the socket. More... | |
void | get_option (GettableSocketOption &option) const |
Get an option from the socket. More... | |
asio::error_code | get_option (GettableSocketOption &option, asio::error_code &ec) const |
Get an option from the socket. More... | |
void | io_control (IoControlCommand &command) |
Perform an IO control command on the socket. More... | |
asio::error_code | io_control (IoControlCommand &command, asio::error_code &ec) |
Perform an IO control command on the socket. More... | |
bool | non_blocking () const |
Gets the non-blocking mode of the socket. More... | |
void | non_blocking (bool mode) |
Sets the non-blocking mode of the socket. More... | |
asio::error_code | non_blocking (bool mode, asio::error_code &ec) |
Sets the non-blocking mode of the socket. More... | |
bool | native_non_blocking () const |
Gets the non-blocking mode of the native socket implementation. More... | |
void | native_non_blocking (bool mode) |
Sets the non-blocking mode of the native socket implementation. More... | |
asio::error_code | native_non_blocking (bool mode, asio::error_code &ec) |
Sets the non-blocking mode of the native socket implementation. More... | |
endpoint_type | local_endpoint () const |
Get the local endpoint of the socket. More... | |
endpoint_type | local_endpoint (asio::error_code &ec) const |
Get the local endpoint of the socket. More... | |
endpoint_type | remote_endpoint () const |
Get the remote endpoint of the socket. More... | |
endpoint_type | remote_endpoint (asio::error_code &ec) const |
Get the remote endpoint of the socket. More... | |
void | shutdown (shutdown_type what) |
Disable sends or receives on the socket. More... | |
asio::error_code | shutdown (shutdown_type what, asio::error_code &ec) |
Disable sends or receives on the socket. More... | |
Public Member Functions inherited from asio::basic_io_object< SeqPacketSocketService > | |
asio::io_service & | get_io_service () |
Get the io_service associated with the object. More... | |
Public Member Functions inherited from asio::socket_base | |
ASIO_STATIC_CONSTANT (int, message_peek=ASIO_OS_DEF(MSG_PEEK)) | |
ASIO_STATIC_CONSTANT (int, message_out_of_band=ASIO_OS_DEF(MSG_OOB)) | |
ASIO_STATIC_CONSTANT (int, message_do_not_route=ASIO_OS_DEF(MSG_DONTROUTE)) | |
ASIO_STATIC_CONSTANT (int, message_end_of_record=ASIO_OS_DEF(MSG_EOR)) | |
ASIO_STATIC_CONSTANT (int, max_connections=ASIO_OS_DEF(SOMAXCONN)) | |
The maximum length of the queue of pending incoming connections. More... | |
Public Attributes | |
socket_base::message_flags | flags |
socket_base::message_flags & | out_flags |
socket_base::message_flags | in_flags |
socket_base::message_flags socket_base::message_flags & | out_flags |
Additional Inherited Members | |
Protected Member Functions inherited from asio::basic_socket< Protocol, SeqPacketSocketService > | |
~basic_socket () | |
Protected destructor to prevent deletion through this type. More... | |
Protected Member Functions inherited from asio::basic_io_object< SeqPacketSocketService > | |
basic_io_object (asio::io_service &io_service) | |
Construct a basic_io_object. More... | |
~basic_io_object () | |
Protected destructor to prevent deletion through this type. More... | |
service_type & | get_service () |
Get the service associated with the I/O object. More... | |
const service_type & | get_service () const |
Get the service associated with the I/O object. More... | |
implementation_type & | get_implementation () |
Get the underlying implementation of the I/O object. More... | |
const implementation_type & | get_implementation () const |
Get the underlying implementation of the I/O object. More... | |
Protected Member Functions inherited from asio::socket_base | |
~socket_base () | |
Protected destructor to prevent deletion through this type. More... | |
Protected Attributes inherited from asio::basic_io_object< SeqPacketSocketService > | |
service_type & | service |
implementation_type | implementation |
Provides sequenced packet socket functionality.
The basic_seq_packet_socket class template provides asynchronous and blocking sequenced packet socket functionality.
Definition at line 41 of file basic_seq_packet_socket.hpp.
typedef Protocol::endpoint asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::endpoint_type |
The endpoint type.
Definition at line 57 of file basic_seq_packet_socket.hpp.
typedef SeqPacketSocketService::native_handle_type asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::native_handle_type |
The native representation of a socket.
Definition at line 51 of file basic_seq_packet_socket.hpp.
typedef SeqPacketSocketService::native_handle_type asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::native_type |
(Deprecated: Use native_handle_type.) The native representation of a socket.
Definition at line 47 of file basic_seq_packet_socket.hpp.
typedef Protocol asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::protocol_type |
The protocol type.
Definition at line 54 of file basic_seq_packet_socket.hpp.
|
inlineexplicit |
Construct a basic_seq_packet_socket without opening it.
This constructor creates a sequenced packet socket without opening it. The socket needs to be opened and then connected or accepted before data can be sent or received on it.
io_service | The io_service object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket. |
Definition at line 69 of file basic_seq_packet_socket.hpp.
|
inline |
Construct and open a basic_seq_packet_socket.
This constructor creates and opens a sequenced_packet socket. The socket needs to be connected or accepted before data can be sent or received on it.
io_service | The io_service object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket. |
protocol | An object specifying protocol parameters to be used. |
asio::system_error | Thrown on failure. |
Definition at line 88 of file basic_seq_packet_socket.hpp.
|
inline |
Construct a basic_seq_packet_socket, opening it and binding it to the given local endpoint. This constructor creates a sequenced packet socket and automatically opens it bound to the specified endpoint on the local machine. The protocol used is the protocol associated with the given endpoint.
io_service | The io_service object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket. |
endpoint | An endpoint on the local machine to which the sequenced packet socket will be bound. |
asio::system_error | Thrown on failure. |
Definition at line 110 of file basic_seq_packet_socket.hpp.
|
inline |
Construct a basic_seq_packet_socket on an existing native socket.
This constructor creates a sequenced packet socket object to hold an existing native socket.
io_service | The io_service object that the sequenced packet socket will use to dispatch handlers for any asynchronous operations performed on the socket. |
protocol | An object specifying protocol parameters to be used. |
native_socket | The new underlying socket implementation. |
asio::system_error | Thrown on failure. |
Definition at line 131 of file basic_seq_packet_socket.hpp.
asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::ASIO_INITFN_RESULT_TYPE | ( | WriteHandler | , |
void(asio::error_code, std::size_t) | |||
) | const |
Start an asynchronous send.
This function is used to asynchronously send data on the sequenced packet socket. The function call always returns immediately.
buffers | One or more data buffers to be sent on the socket. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
flags | Flags specifying how the send call is to be made. |
handler | The handler to be called when the send operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes sent. ); |
asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::ASIO_INITFN_RESULT_TYPE | ( | ReadHandler | , |
void(asio::error_code, std::size_t) | |||
) | const |
Start an asynchronous receive.
This function is used to asynchronously receive data from the sequenced packet socket. The function call always returns immediately.
buffers | One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
out_flags | Once the asynchronous operation completes, contains flags associated with the received data. For example, if the socket_base::message_end_of_record bit is set then the received data marks the end of a record. The caller must guarantee that the referenced variable remains valid until the handler is called. |
handler | The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes received. ); |
asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::ASIO_INITFN_RESULT_TYPE | ( | ReadHandler | , |
void(asio::error_code, std::size_t) | |||
) | const |
Start an asynchronous receive.
This function is used to asynchronously receive data from the sequenced data socket. The function call always returns immediately.
buffers | One or more buffers into which the data will be received. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid until the handler is called. |
in_flags | Flags specifying how the receive call is to be made. |
out_flags | Once the asynchronous operation completes, contains flags associated with the received data. For example, if the socket_base::message_end_of_record bit is set then the received data marks the end of a record. The caller must guarantee that the referenced variable remains valid until the handler is called. |
handler | The handler to be called when the receive operation completes. Copies will be made of the handler as required. The function signature of the handler must be: void handler( std::size_t bytes_transferred // Number of bytes received. ); |
|
inline |
Definition at line 318 of file basic_seq_packet_socket.hpp.
|
inline |
Definition at line 490 of file basic_seq_packet_socket.hpp.
|
inline |
Definition at line 549 of file basic_seq_packet_socket.hpp.
|
inline |
Receive some data on the socket.
This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
buffers | One or more buffers into which the data will be received. |
out_flags | After the receive call completes, contains flags associated with the received data. For example, if the socket_base::message_end_of_record bit is set then the received data marks the end of a record. |
asio::system_error | Thrown on failure. An error code of asio::error::eof indicates that the connection was closed by the peer. |
Definition at line 358 of file basic_seq_packet_socket.hpp.
|
inline |
Receive some data on the socket.
This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
buffers | One or more buffers into which the data will be received. |
in_flags | Flags specifying how the receive call is to be made. |
out_flags | After the receive call completes, contains flags associated with the received data. For example, if the socket_base::message_end_of_record bit is set then the received data marks the end of a record. |
asio::system_error | Thrown on failure. An error code of asio::error::eof indicates that the connection was closed by the peer. |
Definition at line 404 of file basic_seq_packet_socket.hpp.
|
inline |
Receive some data on a connected socket.
This function is used to receive data on the sequenced packet socket. The function call will block until data has been received successfully, or until an error occurs.
buffers | One or more buffers into which the data will be received. |
in_flags | Flags specifying how the receive call is to be made. |
out_flags | After the receive call completes, contains flags associated with the received data. For example, if the socket_base::message_end_of_record bit is set then the received data marks the end of a record. |
ec | Set to indicate what error occurred, if any. |
Definition at line 439 of file basic_seq_packet_socket.hpp.
|
inline |
Send some data on the socket.
This function is used to send data on the sequenced packet socket. The function call will block until the data has been sent successfully, or an until error occurs.
buffers | One or more data buffers to be sent on the socket. |
flags | Flags specifying how the send call is to be made. |
asio::system_error | Thrown on failure. |
Definition at line 244 of file basic_seq_packet_socket.hpp.
|
inline |
Send some data on the socket.
This function is used to send data on the sequenced packet socket. The function call will block the data has been sent successfully, or an until error occurs.
buffers | One or more data buffers to be sent on the socket. |
flags | Flags specifying how the send call is to be made. |
ec | Set to indicate what error occurred, if any. |
Definition at line 273 of file basic_seq_packet_socket.hpp.
socket_base::message_flags asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::flags |
Definition at line 317 of file basic_seq_packet_socket.hpp.
socket_base::message_flags asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::in_flags |
Definition at line 547 of file basic_seq_packet_socket.hpp.
socket_base::message_flags& asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::out_flags |
Definition at line 489 of file basic_seq_packet_socket.hpp.
socket_base::message_flags socket_base::message_flags& asio::basic_seq_packet_socket< Protocol, SeqPacketSocketService >::out_flags |
Definition at line 547 of file basic_seq_packet_socket.hpp.