CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
29 namespace catapult {
namespace extensions {
42 template<
typename TAcceptor>
50 auto endpoint = boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port);
52 acceptor(socketInfo, [port, serviceId, &nodeSubscriber](
const auto& connectResult) {
53 CATAPULT_LOG(
info) <<
"accept result to local node port " << port <<
": " << connectResult.Code;
54 if (net::PeerConnectCode::Accepted == connectResult.Code)
ionet::PacketSocketOptions PacketSocketOptions
Packet socket options.
Definition: AsyncTcpServer.h:46
IncomingConnectionsSubConfiguration IncomingConnections
Incoming connections configuration.
Definition: NodeConfiguration.h:183
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
utils::TimeSpan Timeout
Connection timeout.
Definition: ConnectionSettings.h:49
ionet::PacketSocketOptions toSocketOptions() const
Gets the packet socket options represented by the configured settings.
Definition: ConnectionSettings.h:68
void UpdateAsyncTcpServerSettings(net::AsyncTcpServerSettings &settings, const config::CatapultConfiguration &config)
Updates settings with values in config.
Definition: NetworkUtils.cpp:38
const model::BlockChainConfiguration BlockChain
Block chain configuration.
Definition: CatapultConfiguration.h:48
Settings used to configure connections.
Definition: ConnectionSettings.h:31
ionet::ConnectionSecurityMode IncomingSecurityModes
Accepted security modes of incoming connections initiated by other nodes.
Definition: ConnectionSettings.h:64
uint16_t MaxPendingConnections
Definition: AsyncTcpServer.h:49
auto pushService(TFactory factory, TArgs &&... args)
Creates a new service by calling factory with args service arguments.
Definition: MultiServicePool.h:89
bool AllowAddressReuse
true if the server should reuse ports already in use.
Definition: AsyncTcpServer.h:55
utils::FileSize MaxPacketDataSize
Maximum packet data size.
Definition: NodeConfiguration.h:104
const NodeConfiguration Node
Node configuration.
Definition: CatapultConfiguration.h:51
Node subscriber.
Definition: NodeSubscriber.h:30
NetworkInfo Network
Block chain network.
Definition: BlockChainConfiguration.h:36
virtual void notifyIncomingNode(const Key &identityKey, ionet::ServiceIdentifier serviceId)=0
Indicates a new incoming connection for node with identityKey connected to serviceId.
Immutable wrapper for basic types, to provide some type-safety.
Definition: BaseValue.h:100
uint32_t SocketWorkingBufferSensitivity
Definition: NodeConfiguration.h:101
Definition: MultiServicePool.h:56
model::NetworkIdentifier NetworkIdentifier
Network identifier.
Definition: ConnectionSettings.h:46
utils::TimeSpan ConnectTimeout
Timeout for connecting to a peer.
Definition: NodeConfiguration.h:91
net::ConnectionSettings GetConnectionSettings(const config::CatapultConfiguration &config)
Extracts connection settings from config.
Definition: NetworkUtils.cpp:25
Comprehensive configuration for a catapult process.
Definition: CatapultConfiguration.h:34
NodeRoles
A node's role.
Definition: NodeRoles.h:28
def info(*args)
Definition: forwardsValidation.py:12
uint32_t GetMaxIncomingConnectionsPerIdentity(ionet::NodeRoles roles)
Gets the maximum number of incoming connections per identity as specified by roles.
Definition: NetworkUtils.cpp:47
std::shared_ptr< AsyncTcpServer > CreateAsyncTcpServer(const std::shared_ptr< thread::IoThreadPool > &pPool, const boost::asio::ip::tcp::endpoint &endpoint, const AsyncTcpServerSettings &settings)
Definition: AsyncTcpServer.cpp:217
ionet::ConnectionSecurityMode IncomingSecurityModes
Accepted security modes of incoming connections initiated by other nodes.
Definition: NodeConfiguration.h:128
std::shared_ptr< net::AsyncTcpServer > BootServer(thread::MultiServicePool::ServiceGroup &serviceGroup, unsigned short port, ionet::ServiceIdentifier serviceId, const config::CatapultConfiguration &config, subscribers::NodeSubscriber &nodeSubscriber, TAcceptor acceptor)
Definition: NetworkUtils.h:43
size_t SocketWorkingBufferSensitivity
Socket working buffer sensitivity.
Definition: ConnectionSettings.h:55
bool ShouldAllowAddressReuse
true if the server should reuse ports already in use.
Definition: NodeConfiguration.h:42
utils::FileSize SocketWorkingBufferSize
Socket working buffer size.
Definition: ConnectionSettings.h:52
uint32_t MaxActiveConnections
Definition: AsyncTcpServer.h:52
Settings used to configure AsyncTcpServer behavior.
Definition: AsyncTcpServer.h:33
ionet::ConnectionSecurityMode OutgoingSecurityMode
Security mode of outgoing connections initiated by this node.
Definition: NodeConfiguration.h:125
Definition: AddressExtractionExtension.cpp:28
ionet::ConnectionSecurityMode OutgoingSecurityMode
Security mode of outgoing connections initiated by this node.
Definition: ConnectionSettings.h:61
utils::FileSize MaxPacketDataSize
Maximum packet data size.
Definition: ConnectionSettings.h:58
utils::FileSize SocketWorkingBufferSize
Initial socket working buffer size (socket reads will attempt to read buffers of roughly this size).
Definition: NodeConfiguration.h:97
NetworkIdentifier Identifier
Network identifier.
Definition: NetworkInfo.h:70