Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

basic_socket_streambuf

Iostream streambuf for a socket.

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

Name

Description

broadcast

Socket option to permit sending of broadcast messages.

bytes_readable

IO control command to get the amount of data that can be read without blocking.

debug

Socket option to enable socket-level debugging.

do_not_route

Socket option to prevent routing, use local interfaces only.

duration_type

The duration type.

enable_connection_aborted

Socket option to report aborted connections on accept.

endpoint_type

The endpoint type.

implementation_type

The underlying implementation type of I/O object.

keep_alive

Socket option to send keep-alives.

linger

Socket option to specify whether the socket lingers on close if unsent data is present.

lowest_layer_type

A basic_socket is always the lowest layer.

message_flags

Bitmask type for flags that can be passed to send and receive operations.

native_handle_type

The native representation of a socket.

native_type

(Deprecated: Use native_handle_type.) The native representation of a socket.

non_blocking_io

(Deprecated: Use non_blocking().) IO control command to set the blocking mode of the socket.

protocol_type

The protocol type.

receive_buffer_size

Socket option for the receive buffer size of a socket.

receive_low_watermark

Socket option for the receive low watermark.

reuse_address

Socket option to allow the socket to be bound to an address that is already in use.

send_buffer_size

Socket option for the send buffer size of a socket.

send_low_watermark

Socket option for the send low watermark.

service_type

The type of the service that will be used to provide I/O operations.

shutdown_type

Different ways a socket may be shutdown.

time_type

The time type.

Member Functions

Name

Description

assign

Assign an existing native socket to the socket.

async_connect

Start an asynchronous connect.

at_mark

Determine whether the socket is at the out-of-band data mark.

available

Determine the number of bytes available for reading.

basic_socket_streambuf

Construct a basic_socket_streambuf without establishing a connection.

bind

Bind the socket to the given local endpoint.

cancel

Cancel all asynchronous operations associated with the socket.

close

Close the connection.

Close the socket.

connect

Establish a connection.

Connect the socket to the specified endpoint.

expires_at

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

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

expires_from_now

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

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

get_io_service

Get the io_service associated with the object.

get_option

Get an option from the socket.

io_control

Perform an IO control command on the socket.

is_open

Determine whether the socket is open.

local_endpoint

Get the local endpoint of the socket.

lowest_layer

Get a reference to the lowest layer.

Get a const reference to the lowest layer.

native

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

native_handle

Get the native socket representation.

native_non_blocking

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

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

non_blocking

Gets the non-blocking mode of the socket.

Sets the non-blocking mode of the socket.

open

Open the socket using the specified protocol.

puberror

Get the last error associated with the stream buffer.

remote_endpoint

Get the remote endpoint of the socket.

set_option

Set an option on the socket.

shutdown

Disable sends or receives on the socket.

~basic_socket_streambuf

Destructor flushes buffered data.

Protected Member Functions

Name

Description

error

Get the last error associated with the stream buffer.

get_implementation

Get the underlying implementation of the I/O object.

get_service

Get the service associated with the I/O object.

overflow

setbuf

sync

underflow

Data Members

Name

Description

max_connections

The maximum length of the queue of pending incoming connections.

message_do_not_route

Specify that the data should not be subject to routing.

message_end_of_record

Specifies that the data marks the end of a record.

message_out_of_band

Process out-of-band data.

message_peek

Peek at incoming data without removing it from the input queue.

Protected Data Members

Name

Description

implementation

(Deprecated: Use get_implementation().) The underlying implementation of the I/O object.

service

(Deprecated: Use get_service().) The service associated with the I/O object.

Friends

Name

Description

io_handler

timer_handler

Requirements

Header: boost/asio/basic_socket_streambuf.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext