Seastar
High performance C++ framework for concurrent servers
|
Represents the listening port and all accepted connections.
#include <seastar/rpc/rpc.hh>
Public Member Functions | |
server (protocol &proto, const socket_address &addr, resource_limits memory_limit=resource_limits()) | |
server (protocol &proto, server_options opts, const socket_address &addr, resource_limits memory_limit=resource_limits()) | |
server (protocol &proto, server_socket socket, resource_limits memory_limit=resource_limits(), server_options=server_options{}) | |
server (protocol &proto, server_options opts, server_socket socket, resource_limits memory_limit=resource_limits()) | |
void | accept () |
future | stop () |
future | shutdown () |
template<typename Func > | |
void | foreach_connection (Func &&f) |
void | abort_connection (connection_id id) |
gate & | reply_gate () |
Public Attributes | |
friend | connection |
friend | client |
|
inherited |
Abort the given connection, causing it to stop receiving any further messages. It's safe to abort a connection from an RPC handler running on that connection. Does nothing if there is no connection with the given ID on this server.
id | the ID of the connection to abort. |
|
inherited |
Shuts down the server.
Light version of the stop, that just makes sure the server is not visible by remote clients, i.e. – no new rpcs are admitted and no replies on the previously running handlers will be sent. Currently running handlers may still run.
Caller of shutdown() mush wait for it to resolve before calling stop.
|
inherited |
Stops the server.
It makes sure that no new rpcs are admitted, no rpc handlers issued on this connection are running any longer and no replies on the previously running handlers will be sent.