Seastar
High performance C++ framework for concurrent servers
Namespaces | Classes | Functions
Networking

Namespaces

 seastar
 Seastar API namespace.
 

Classes

class  connected_socket
 
class  seastar::socket
 
class  server_socket
 A listening socket, waiting to accept incoming network connections. More...
 

Functions

server_socket listen (socket_address sa)
 
server_socket listen (socket_address sa, listen_options opts)
 
future< connected_socketconnect (socket_address sa)
 
future< connected_socketconnect (socket_address sa, socket_address local, seastar::transport proto)
 

Detailed Description

Seastar provides a simple networking API, backed by two TCP/IP stacks: the POSIX stack, utilizing the kernel's BSD socket APIs, and the native stack, implement fully within seastar and able to drive network cards directly. The native stack supports zero-copy on both transmit and receive, and is implemented using seastar's high performance, lockless sharded design. The network stack can be selected with the --network-stack command-line parameter.

Function Documentation

Establishes a connection to a given address

Attempts to connect to the given address.

Parameters
sasocket address to connect to
Returns
a connected_socket object, or an exception
future<connected_socket> connect ( socket_address  sa,
socket_address  local,
seastar::transport  proto 
)

Establishes a connection to a given address

Attempts to connect to the given address with a defined local endpoint

Parameters
sasocket address to connect to
localsocket address for local endpoint
prototransport protocol (TCP or SCTP)
Returns
a connected_socket object, or an exception
server_socket listen ( socket_address  sa)

Listen for connections on a given port

Starts listening on a given address for incoming connections.

Parameters
sasocket address to listen on
Returns
server_socket object ready to accept connections.
See also
listen(socket_address sa, listen_options opts)
server_socket listen ( socket_address  sa,
listen_options  opts 
)

Listen for connections on a given port

Starts listening on a given address for incoming connections.

Parameters
sasocket address to listen on
optsoptions controlling the listen operation
Returns
server_socket object ready to accept connections.
See also
listen(socket_address sa)