Iostream interface for a socket. More...
#include <basic_socket_iostream.hpp>
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 Member Functions | |
basic_socket_iostream () | |
Construct a basic_socket_iostream without establishing a connection. More... | |
void | close () |
Close the connection. More... | |
basic_socket_streambuf < Protocol, StreamSocketService, Time, TimeTraits, TimerService > * | rdbuf () const |
Return a pointer to the underlying streambuf. More... | |
const boost::system::error_code & | error () const |
Get the last error associated with the stream. More... | |
time_type | expires_at () const |
Get the stream's expiry time as an absolute time. More... | |
void | expires_at (const time_type &expiry_time) |
Set the stream's expiry time as an absolute time. More... | |
duration_type | expires_from_now () const |
Get the timer's expiry time relative to now. More... | |
void | expires_from_now (const duration_type &expiry_time) |
Set the stream's expiry time relative to now. More... | |
Private Attributes | |
basic_socket_streambuf < Protocol, StreamSocketService, Time, TimeTraits, TimerService > | streambuf_ |
Iostream interface for a socket.
typedef traits_helper::duration_type boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::duration_type |
typedef Protocol::endpoint boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::endpoint_type |
The endpoint type.
typedef traits_helper::time_type boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::time_type |
|
inline |
Construct a basic_socket_iostream without establishing a connection.
|
inline |
Close the connection.
References boost::regex_constants::failbit, and boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Get the last error associated with the stream.
error_code
corresponding to the last error from the stream.References boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Get the stream's expiry time as an absolute time.
References boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Set the stream'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 boost::asio::error::operation_aborted.
expiry_time | The expiry time to be used for the stream. |
References boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Get the timer's expiry time relative to now.
References boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Set the stream'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 boost::asio::error::operation_aborted.
expiry_time | The expiry time to be used for the timer. |
References boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::rdbuf().
|
inline |
Return a pointer to the underlying streambuf.
Referenced by boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::close(), boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::error(), boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_at(), and boost::asio::basic_socket_iostream< Protocol, StreamSocketService, Time, TimeTraits, TimerService >::expires_from_now().