CatapultServer  v0.5.0.1 (Elephant)
ConnectionContainer.h
Go to the documentation of this file.
1 
21 #pragma once
23 
24 namespace catapult { namespace net {
25 
28  public:
29  virtual ~ConnectionContainer() = default;
30 
31  public:
33  virtual size_t numActiveConnections() const = 0;
34 
36  virtual utils::KeySet identities() const = 0;
37 
38  public:
40  virtual bool closeOne(const Key& identityKey) = 0;
41  };
42 }}
catapult::net::ConnectionContainer::closeOne
virtual bool closeOne(const Key &identityKey)=0
Closes any active connections to the node identified by identityKey.
catapult::net::ConnectionContainer::~ConnectionContainer
virtual ~ConnectionContainer()=default
catapult::utils::KeySet
ArraySet< Key > KeySet
A key set.
Definition: ArraySet.h:64
catapult::net::ConnectionContainer::numActiveConnections
virtual size_t numActiveConnections() const =0
Gets the number of active connections (including pending connections).
catapult::net::ConnectionContainer
Manages a collection of connections.
Definition: ConnectionContainer.h:27
ArraySet.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Key_Size, Key_tag >
catapult::net::ConnectionContainer::identities
virtual utils::KeySet identities() const =0
Gets the identities of active connections.