Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Public Attributes | List of all members
seastar::rpc::protocol< Serializer, MsgType >::server Class Reference

Detailed Description

template<typename Serializer, typename MsgType = uint32_t>
class seastar::rpc::protocol< Serializer, MsgType >::server

Represents the listening port and all accepted connections.

#include <seastar/rpc/rpc.hh>

Inheritance diagram for seastar::rpc::protocol< Serializer, MsgType >::server:
seastar::rpc::server

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)
 
gatereply_gate ()
 

Public Attributes

friend connection
 
friend client
 

Member Function Documentation

◆ abort_connection()

void seastar::rpc::server::abort_connection ( connection_id  id)
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.

Parameters
idthe ID of the connection to abort.

◆ shutdown()

future seastar::rpc::server::shutdown ( )
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.

◆ stop()

future seastar::rpc::server::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.


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