Realistic 3D camera system
3D camera system components
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > Class Template Reference

Iostream streambuf for a socket. More...

#include <basic_socket_streambuf.hpp>

Inheritance diagram for asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >:
asio::detail::socket_streambuf_base asio::basic_socket< Protocol, StreamSocketService > asio::basic_io_object< StreamSocketService > asio::socket_base

Public Types

typedef Protocol::endpoint endpoint_type
 The endpoint type. More...
 
typedef traits_helper::time_type time_type
 
typedef traits_helper::duration_type duration_type
 
- Public Types inherited from asio::basic_socket< Protocol, StreamSocketService >
typedef StreamSocketService::native_handle_type native_type
 
typedef StreamSocketService::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, StreamSocketService > lowest_layer_type
 A basic_socket is always the lowest layer. More...
 
- Public Types inherited from asio::basic_io_object< StreamSocketService >
typedef StreamSocketService 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_optionenable_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_socket_streambuf ()
 Construct a basic_socket_streambuf without establishing a connection. More...
 
virtual ~basic_socket_streambuf ()
 Destructor flushes buffered data. More...
 
basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * connect (const endpoint_type &endpoint)
 Establish a connection. More...
 
basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService > * close ()
 Close the connection. More...
 
const asio::error_codepuberror () const
 Get the last error associated with the stream buffer. More...
 
time_type expires_at () const
 Get the stream buffer's expiry time as an absolute time. More...
 
void expires_at (const time_type &expiry_time)
 Set the stream buffer's expiry time as an absolute time. More...
 
duration_type expires_from_now () const
 Get the stream buffer's expiry time relative to now. More...
 
void expires_from_now (const duration_type &expiry_time)
 Set the stream buffer's expiry time relative to now. More...
 
- Public Member Functions inherited from asio::basic_socket< Protocol, StreamSocketService >
 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_typelowest_layer ()
 Get a reference to the lowest layer. More...
 
const lowest_layer_typelowest_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< StreamSocketService >
asio::io_serviceget_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...
 

Protected Member Functions

int_type underflow ()
 
int_type overflow (int_type c)
 
int sync ()
 
std::streambuf * setbuf (char_type *s, std::streamsize n)
 
virtual const asio::error_codeerror () const
 Get the last error associated with the stream buffer. More...
 
- Protected Member Functions inherited from asio::basic_socket< Protocol, StreamSocketService >
 ~basic_socket ()
 Protected destructor to prevent deletion through this type. More...
 
- Protected Member Functions inherited from asio::basic_io_object< StreamSocketService >
 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_typeget_service ()
 Get the service associated with the I/O object. More...
 
const service_typeget_service () const
 Get the service associated with the I/O object. More...
 
implementation_typeget_implementation ()
 Get the underlying implementation of the I/O object. More...
 
const implementation_typeget_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...
 

Friends

struct io_handler
 
struct timer_handler
 

Additional Inherited Members

- Protected Attributes inherited from asio::basic_io_object< StreamSocketService >
service_typeservice
 
implementation_type implementation
 

Detailed Description

template<typename Protocol, typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
class asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >

Iostream streambuf for a socket.

Definition at line 101 of file basic_socket_streambuf.hpp.

Member Typedef Documentation

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
typedef traits_helper::duration_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::duration_type

Definition at line 127 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
typedef Protocol::endpoint asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::endpoint_type

The endpoint type.

Definition at line 117 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
typedef traits_helper::time_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::time_type

Definition at line 126 of file basic_socket_streambuf.hpp.

Constructor & Destructor Documentation

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::basic_socket_streambuf ( )
inline

Construct a basic_socket_streambuf without establishing a connection.

Definition at line 131 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
virtual asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::~basic_socket_streambuf ( )
inlinevirtual

Destructor flushes buffered data.

Definition at line 142 of file basic_socket_streambuf.hpp.

Member Function Documentation

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>* asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::close ( )
inline

Close the connection.

Returns
this if a connection was successfully established, a null pointer otherwise.

Definition at line 219 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
basic_socket_streambuf<Protocol, StreamSocketService, Time, TimeTraits, TimerService>* asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::connect ( const endpoint_type endpoint)
inline

Establish a connection.

This function establishes a connection to the specified endpoint.

Returns
this if a connection was successfully established, a null pointer otherwise.

Definition at line 158 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
virtual const asio::error_code& asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::error ( ) const
inlineprotectedvirtual

Get the last error associated with the stream buffer.

Returns
An error_code corresponding to the last error from the stream buffer.

Definition at line 426 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
time_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_at ( ) const
inline

Get the stream buffer's expiry time as an absolute time.

Returns
An absolute time value representing the stream buffer's expiry time.

Definition at line 243 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
void asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_at ( const time_type expiry_time)
inline

Set the stream buffer's expiry time as an absolute time.

This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error asio::error::operation_aborted.

Parameters
expiry_timeThe expiry time to be used for the stream.

Definition at line 259 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
duration_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_from_now ( ) const
inline

Get the stream buffer's expiry time relative to now.

Returns
A relative time value representing the stream buffer's expiry time.

Definition at line 274 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
void asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_from_now ( const duration_type expiry_time)
inline

Set the stream buffer's expiry time relative to now.

This function sets the expiry time associated with the stream. Stream operations performed after this time (where the operations cannot be completed using the internal buffers) will fail with the error asio::error::operation_aborted.

Parameters
expiry_timeThe expiry time to be used for the timer.

Definition at line 288 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
int_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::overflow ( int_type  c)
inlineprotected

Definition at line 332 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
const asio::error_code& asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::puberror ( ) const
inline

Get the last error associated with the stream buffer.

Returns
An error_code corresponding to the last error from the stream buffer.

Definition at line 233 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
std::streambuf* asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::setbuf ( char_type *  s,
std::streamsize  n 
)
inlineprotected

Definition at line 409 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
int asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::sync ( )
inlineprotected

Definition at line 404 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
int_type asio::basic_socket_streambuf< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::underflow ( )
inlineprotected

Definition at line 300 of file basic_socket_streambuf.hpp.

Friends And Related Function Documentation

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
friend struct io_handler
friend

Definition at line 478 of file basic_socket_streambuf.hpp.

template<typename Protocol , typename StreamSocketService = stream_socket_service<Protocol>, typename Time = steady_timer::clock_type, typename TimeTraits = steady_timer::traits_type, typename TimerService = steady_timer::service_type>
friend struct timer_handler
friend

Definition at line 492 of file basic_socket_streambuf.hpp.


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