CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 namespace crypto {
class KeyPair; }
29 namespace ionet {
class PacketSocket; }
30 namespace thread {
class IoThreadPool; }
50 virtual void accept(
const std::shared_ptr<ionet::PacketSocket>& pAcceptedSocket,
const AcceptCallback& callback) = 0;
58 const std::shared_ptr<thread::IoThreadPool>& pPool,
virtual ~ClientConnector()=default
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
std::shared_ptr< ClientConnector > CreateClientConnector(const std::shared_ptr< thread::IoThreadPool > &pPool, const crypto::KeyPair &keyPair, const ConnectionSettings &settings)
Creates a client connector for a server with a key pair of keyPair using pPool and configured with se...
Definition: ClientConnector.cpp:104
SynchronizationFilter CreateClampingFilter()
Creates a filter that filters out out samples that have a non tolerable high time offset.
Definition: ClampingFilter.cpp:35
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
virtual size_t numActiveConnections() const =0
Gets the number of active connections.
utils::WeakContainer< ionet::PacketSocket > m_sockets
Definition: ClientConnector.cpp:100
def warning(*args)
Definition: colorPrint.py:10
consumer< PeerConnectCode, const std::shared_ptr< ionet::PacketSocket > &, const Key & > AcceptCallback
A callback that is passed the accept result as well as the client socket and public key (on success).
Definition: ClientConnector.h:39
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.
int64_t ToInt64(TBaseValue value)
Converts base value to int64_t.
Definition: MapperUtils.h:75
ConnectionSettings m_settings
Definition: ClientConnector.cpp:99
constexpr double Decay_Strength
Value that indicates the speed of the decay.
Definition: filter_constants.h:37
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
std::shared_ptr< thread::IoThreadPool > m_pPool
Definition: ClientConnector.cpp:97
const crypto::KeyPair & m_keyPair
Definition: ClientConnector.cpp:98
void VerifyClient(const std::shared_ptr< ionet::PacketIo > &pClientIo, const crypto::KeyPair &keyPair, ionet::ConnectionSecurityMode allowedSecurityModes, const VerifyCallback &callback)
Definition: VerifyPeer.cpp:120
def info(*args)
Definition: forwardsValidation.py:12
boost::asio::ip::tcp::socket socket
Definition: IoTypes.h:30
consumer< const AcceptedPacketSocketInfo & > AcceptCallback
Callback for an accepted socket.
Definition: PacketSocket.h:106
predicate< const TimeSynchronizationSample &, NodeAge > SynchronizationFilter
Signature of a synchronization filter.
Definition: SynchronizationFilters.h:29
SocketPointer pSocket
Definition: PacketWriters.cpp:46
constexpr int64_t Start_Decay_After_Round
Value that indicates after which round the decay starts.
Definition: filter_constants.h:34
Definition: AddressExtractionExtension.cpp:28
virtual void shutdown()=0
Shuts down all connections.
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
constexpr auto Tolerated_Deviation_Start
Start value for the maximum tolerated deviation in ms.
Definition: filter_constants.h:28
Accepts connections that are initiated by external nodes to this (local) node.
Definition: ClientConnector.h:36
constexpr auto Tolerated_Deviation_Minimum
Minimum value for the maximum tolerated deviation in ms.
Definition: filter_constants.h:31