Seastar
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 <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=socket_address(::sockaddr_in{AF_INET, INADDR_ANY, {0}}), transport proto=transport::TCP)
 
void shutdown ()
 

Member Function Documentation

◆ connect()

future< connected_socket > seastar::socket::connect ( socket_address  sa,
socket_address  local = socket_address(::sockaddr_in{AF_INET, INADDR_ANY, {0}}),
transport  proto = transport::TCP 
)

Attempts to establish the connection.

Returns
a connected_socket representing the connection.

◆ 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 files: