CatapultServer  v0.5.0.1 (Elephant)
catapult::net::ClientConnector Class Referenceabstract

Accepts connections that are initiated by external nodes to this (local) node. More...

Public Types

using AcceptCallback = consumer< PeerConnectCode, const std::shared_ptr< ionet::PacketSocket > &, const Key & >
 A callback that is passed the accept result as well as the client socket and public key (on success). More...
 

Public Member Functions

virtual ~ClientConnector ()=default
 
virtual size_t numActiveConnections () const =0
 Gets the number of active connections. More...
 
virtual void accept (const std::shared_ptr< ionet::PacketSocket > &pAcceptedSocket, const AcceptCallback &callback)=0
 Accepts a connection represented by pAcceptedSocket and calls callback on completion. More...
 
virtual void shutdown ()=0
 Shuts down all connections. More...
 

Detailed Description

Accepts connections that are initiated by external nodes to this (local) node.

Member Typedef Documentation

◆ AcceptCallback

A callback that is passed the accept result as well as the client socket and public key (on success).

Constructor & Destructor Documentation

◆ ~ClientConnector()

virtual catapult::net::ClientConnector::~ClientConnector ( )
virtualdefault

Member Function Documentation

◆ accept()

virtual void catapult::net::ClientConnector::accept ( const std::shared_ptr< ionet::PacketSocket > &  pAcceptedSocket,
const AcceptCallback callback 
)
pure virtual

Accepts a connection represented by pAcceptedSocket and calls callback on completion.

◆ numActiveConnections()

virtual size_t catapult::net::ClientConnector::numActiveConnections ( ) const
pure virtual

Gets the number of active connections.

◆ shutdown()

virtual void catapult::net::ClientConnector::shutdown ( )
pure virtual

Shuts down all connections.


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