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

Establishes connections with external nodes that this (local) node initiates. More...

Public Types

using ConnectCallback = consumer< PeerConnectCode, const std::shared_ptr< ionet::PacketSocket > & >
 A callback that is passed the connect result and the connected socket on success. More...
 

Public Member Functions

virtual ~ServerConnector ()=default
 
virtual size_t numActiveConnections () const =0
 Gets the number of active connections. More...
 
virtual void connect (const ionet::Node &node, const ConnectCallback &callback)=0
 Attempts to connect to node and calls callback on completion. More...
 
virtual void shutdown ()=0
 Shuts down all connections. More...
 

Detailed Description

Establishes connections with external nodes that this (local) node initiates.

Member Typedef Documentation

◆ ConnectCallback

A callback that is passed the connect result and the connected socket on success.

Constructor & Destructor Documentation

◆ ~ServerConnector()

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

Member Function Documentation

◆ connect()

virtual void catapult::net::ServerConnector::connect ( const ionet::Node node,
const ConnectCallback callback 
)
pure virtual

Attempts to connect to node and calls callback on completion.

◆ numActiveConnections()

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

Gets the number of active connections.

◆ shutdown()

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

Shuts down all connections.


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