CppCMS
|
This class represents a basic Socket object. More...
#include <booster/booster/aio/basic_socket.h>
Public Types | |
enum | boolean_option_type { tcp_no_delay, keep_alive, reuse_address } |
Public Member Functions | |
basic_socket () | |
basic_socket (io_service &srv) | |
void | open (family_type d, socket_type t) |
void | open (family_type d, socket_type t, system::error_code &e) |
endpoint | local_endpoint (system::error_code &e) |
endpoint | local_endpoint () |
endpoint | remote_endpoint (system::error_code &e) |
endpoint | remote_endpoint () |
bool | get_option (boolean_option_type opt, system::error_code &e) |
bool | get_option (boolean_option_type opt) |
void | set_option (boolean_option_type opt, bool v, system::error_code &e) |
void | set_option (boolean_option_type opt, bool v) |
This class represents a basic Socket object.
Boolean socket options list
Create a new socket object
Create a new socket object and connect to the io_service srv
bool booster::aio::basic_socket::get_option | ( | boolean_option_type | opt, |
system::error_code & | e | ||
) |
Get a value for a boolean_option_type
If a error occurs it is assigned to e.
Get a value for a boolean_option_type Throws system::system_error if error occurs.
Get a local endpoint for the socket
If a error occurs it is assigned to e.
Get a local endpoint for the socket
Throws system::system_error if error occurs.
void booster::aio::basic_socket::open | ( | family_type | d, |
socket_type | t | ||
) |
Open a socket of family_type d and of the protocol (socket_type) t
Throws system::system_error if error occurs.
void booster::aio::basic_socket::open | ( | family_type | d, |
socket_type | t, | ||
system::error_code & | e | ||
) |
Opens a new stream socket of a family_type d
If a error occurs it is assigned to e.
Get a remote endpoint for the socket
If a error occurs it is assigned to e.
Get a remote endpoint for the socket
Throws system::system_error if error occurs.
void booster::aio::basic_socket::set_option | ( | boolean_option_type | opt, |
bool | v, | ||
system::error_code & | e | ||
) |
Set a value for a boolean_option_type
If a error occurs it is assigned to e.
void booster::aio::basic_socket::set_option | ( | boolean_option_type | opt, |
bool | v | ||
) |
Set a value for a boolean_option_type
Throws system::system_error if error occurs.