asio C++ library

PrevUpHomeNext

basic_socket_iostream

Iostream interface for a socket.

template<
    typename Protocol,
    typename StreamSocketService = stream_socket_service<Protocol>,
    typename Time = boost::posix_time::ptime,
    typename TimeTraits = asio::time_traits<Time>,
    typename TimerService = deadline_timer_service<Time, TimeTraits>>
class basic_socket_iostream
Types

Name

Description

duration

The duration type.

duration_type

(Deprecated: Use duration.) The duration type.

endpoint_type

The endpoint type.

time_point

The time type.

time_type

(Deprecated: Use time_point.) The time type.

Member Functions

Name

Description

basic_socket_iostream

Construct a basic_socket_iostream without establishing a connection.

Establish a connection to an endpoint corresponding to a resolver query.

close

Close the connection.

connect

Establish a connection to an endpoint corresponding to a resolver query.

error

Get the last error associated with the stream.

expires_after

Set the stream's expiry time relative to now.

expires_at

(Deprecated: Use expiry().) Get the stream's expiry time as an absolute time.

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

expires_from_now

(Deprecated: Use expiry().) Get the stream's expiry time relative to now.

(Deprecated: Use expires_after().) Set the stream's expiry time relative to now.

expiry

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

rdbuf

Return a pointer to the underlying streambuf.

Requirements

Header: asio/basic_socket_iostream.hpp

Convenience header: asio.hpp


PrevUpHomeNext