Seastar
High performance C++ framework for concurrent servers
|
The seastar socket.
A socket
that allows a connection to be established between two endpoints.
#include <seastar/net/api.hh>
Public Member Functions | |
socket (socket &&) noexcept | |
Moves a seastar::socket object. | |
socket & | operator= (socket &&) noexcept |
Move-assigns a seastar::socket object. | |
future< connected_socket > | connect (socket_address sa, socket_address local={}, transport proto=transport::TCP) |
void | set_reuseaddr (bool reuseaddr) |
Sets SO_REUSEADDR option (enable reuseaddr option on a socket) | |
bool | get_reuseaddr () const |
void | shutdown () |
future< connected_socket > seastar::socket::connect | ( | socket_address | sa, |
socket_address | local = {} , |
||
transport | proto = transport::TCP |
||
) |
Attempts to establish the connection.
bool seastar::socket::get_reuseaddr | ( | ) | const |
Gets O_REUSEADDR option
void seastar::socket::shutdown | ( | ) |
Stops any in-flight connection attempt.
Cancels the connection attempt if it's still in progress, and terminates the connection if it has already been established.