CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 namespace crypto {
class KeyPair; }
33 namespace thread {
class IoThreadPool; }
61 const std::shared_ptr<thread::IoThreadPool>& pPool,
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
action Connect(boost::asio::io_context &ioContext, const PacketSocketOptions &options, const NodeEndpoint &endpoint, const ConnectCallback &callback)
Definition: PacketSocket.cpp:525
consumer< ConnectResult, const std::shared_ptr< PacketSocket > & > ConnectCallback
Callback for a connected socket.
Definition: PacketSocket.h:125
def debug(*args)
Definition: Parser.py:46
Settings used to configure connections.
Definition: ConnectionSettings.h:31
std::shared_ptr< PacketSocket > Secure(const std::shared_ptr< PacketSocket > &pSocket, ConnectionSecurityMode securityMode, const crypto::KeyPair &sourceKeyPair, const Key &remoteKey, utils::FileSize maxPacketDataSize)
Definition: SecurePacketSocketDecorator.cpp:85
def warning(*args)
Definition: colorPrint.py:10
ConnectionSettings m_settings
Definition: ServerConnector.cpp:114
consumer< PeerConnectCode, const std::shared_ptr< ionet::PacketSocket > & > ConnectCallback
A callback that is passed the connect result and the connected socket on success.
Definition: ServerConnector.h:42
void VerifyServer(const std::shared_ptr< ionet::PacketIo > &pServerIo, const VerifiedPeerInfo &serverPeerInfo, const crypto::KeyPair &keyPair, const VerifyCallback &callback)
Definition: VerifyPeer.cpp:201
std::shared_ptr< ServerConnector > CreateServerConnector(const std::shared_ptr< thread::IoThreadPool > &pPool, const crypto::KeyPair &keyPair, const ConnectionSettings &settings)
Creates a server connector for a server with a key pair of keyPair using pPool and configured with se...
Definition: ServerConnector.cpp:119
std::shared_ptr< thread::IoThreadPool > m_pPool
Definition: ServerConnector.cpp:112
virtual void shutdown()=0
Shuts down all connections.
virtual ~ServerConnector()=default
auto MakeTimedCallback(boost::asio::io_context &ioContext, TCallback callback, TCallbackArgs &&... timeoutArgs)
Definition: TimedCallback.h:170
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
virtual size_t numActiveConnections() const =0
Gets the number of active connections.
def info(*args)
Definition: forwardsValidation.py:12
boost::asio::ip::tcp::socket socket
Definition: IoTypes.h:30
const crypto::KeyPair & m_keyPair
Definition: ServerConnector.cpp:113
SocketPointer pSocket
Definition: PacketWriters.cpp:46
ionet::Node Node
Definition: PacketWriters.cpp:45
Definition: AddressExtractionExtension.cpp:28
A node in the catapult network.
Definition: Node.h:82
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
virtual void connect(const ionet::Node &node, const ConnectCallback &callback)=0
Attempts to connect to node and calls callback on completion.
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
Establishes connections with external nodes that this (local) node initiates.
Definition: ServerConnector.h:39
utils::WeakContainer< ionet::PacketSocket > m_sockets
Definition: ServerConnector.cpp:115