High performance C++ framework for concurrent servers
Public Member Functions | List of all members
seastar::socket Class Reference

Detailed Description

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.
socketoperator= (socket &&) noexcept
 Move-assigns a seastar::socket object.
future< connected_socketconnect (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 ()

Member Function Documentation

◆ connect()

future<connected_socket> seastar::socket::connect ( socket_address  sa,
socket_address  local = {},
transport  proto = transport::TCP 

Attempts to establish the connection.

a connected_socket representing the connection.

◆ get_reuseaddr()

bool seastar::socket::get_reuseaddr ( ) const

Gets O_REUSEADDR option

whether the reuseaddr option is enabled or not

◆ shutdown()

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.

The documentation for this class was generated from the following file: