|
CppCMS
|
this class represents a socket that accepts incoming connections More...
#include <booster/booster/aio/acceptor.h>
Additional Inherited Members | |
Public Types inherited from booster::aio::basic_socket | |
| enum | boolean_option_type { tcp_no_delay, keep_alive, reuse_address } |
| enum | integer_option_type { receive_buffer_size, send_buffer_size } |
Static Public Member Functions inherited from booster::aio::basic_io_device | |
| static bool | would_block (system::error_code const &e) |
Protected Member Functions inherited from booster::aio::basic_io_device | |
| bool | dont_block (event_handler const &c) |
| bool | dont_block (io_handler const &c) |
this class represents a socket that accepts incoming connections
| booster::aio::acceptor::acceptor | ( | ) |
Create a new acceptor object
| booster::aio::acceptor::acceptor | ( | io_service & | srv | ) |
Create a new acceptor object with assigned io_service srv)
| void booster::aio::acceptor::accept | ( | stream_socket & | s | ) |
Accepts a new incoming connection to the socket s
Throws system::system_error if error occurs.
| void booster::aio::acceptor::accept | ( | stream_socket & | s, |
| system::error_code & | e | ||
| ) |
Accepts a new incoming connection to the socket s
If a error occurs it is assigned to e.
| void booster::aio::acceptor::async_accept | ( | stream_socket & | s, |
| event_handler const & | h | ||
| ) |
Accept the connection asynchronously. The reference s must be valid until h is called.
If io_service is not assigned throws system::system_error, all other errors reported via the callback h.
| void booster::aio::acceptor::bind | ( | endpoint const & | ep | ) |
Bind the opended socket the endpoint ep
Throws system::system_error if error occurs.
Note: calls basic_socket::bind(ep) - exists there just for backward compatibility
| void booster::aio::acceptor::bind | ( | endpoint const & | ep, |
| system::error_code & | e | ||
| ) |
Bind the opended socket the endpoint ep
If a error occurs it is assigned to e.
Note: calls basic_socket::bind(ep,e) - exists there just for backward compatibility
| void booster::aio::acceptor::listen | ( | int | backlog | ) |
Starts listening on the socket with backlog parameter backlog
Throws system::system_error if error occurs.
| void booster::aio::acceptor::listen | ( | int | backlog, |
| system::error_code & | e | ||
| ) |
Starts listening on the socket with backlog parameter backlog
If a error occurs it is assigned to e.
| void booster::aio::acceptor::open | ( | family_type | d | ) |
Opens a new stream socket of a family_type d
Throws system::system_error if error occurs.
| void booster::aio::acceptor::open | ( | family_type | d, |
| system::error_code & | e | ||
| ) |
Opens a new stream socket of a family_type d
If a error occurs it is assigned to e.
1.8.11