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

Detailed Description

A listening socket, waiting to accept incoming network connections.

#include <seastar/net/api.hh>

Public Types

enum  load_balancing_algorithm { connection_distribution, port, default_ = connection_distribution }

Public Member Functions

 server_socket ()
 Constructs a server_socket not corresponding to a connection.
 server_socket (server_socket &&ss) noexcept
 Moves a server_socket object.
server_socketoperator= (server_socket &&cs) noexcept
 Move-assigns a server_socket object.
future< connected_socket, socket_addressaccept ()
void abort_accept ()
socket_address local_address () const
 Local bound address.

Member Function Documentation

◆ abort_accept()

void seastar::server_socket::abort_accept ( )

Stops any accept() in progress.

Current and future accept() calls will terminate immediately with an error.

◆ accept()

future<connected_socket, socket_address> seastar::server_socket::accept ( )

Accepts the next connection to successfully connect to this socket.

a connected_socket representing the connection, and a socket_address describing the remote endpoint.
See also
listen(socket_address sa)
listen(socket_address sa, listen_options opts)

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