CatapultServer  v0.5.0.1 (Elephant)
PacketIoPicker.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <memory>
24 
25 namespace catapult { namespace utils { class TimeSpan; } }
26 
27 namespace catapult { namespace net {
28 
31  public:
32  virtual ~PacketIoPicker() = default;
33 
34  public:
37  virtual ionet::NodePacketIoPair pickOne(const utils::TimeSpan& ioDuration) = 0;
38  };
39 
42  std::vector<ionet::NodePacketIoPair> PickMultiple(PacketIoPicker& picker, size_t numRequested, const utils::TimeSpan& ioDuration);
43 }}
NodePacketIoPair.h
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
PacketIoPicker.h
catapult::net::PickMultiple
std::vector< ionet::NodePacketIoPair > PickMultiple(PacketIoPicker &picker, size_t numRequested, const utils::TimeSpan &ioDuration)
Definition: PacketIoPicker.cpp:26
catapult::net::PacketIoPicker
An interface for picking packet io pairs.
Definition: PacketIoPicker.h:30
catapult::net::PacketIoPicker::pickOne
virtual ionet::NodePacketIoPair pickOne(const utils::TimeSpan &ioDuration)=0
TimeSpan.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::net::PacketIoPicker::~PacketIoPicker
virtual ~PacketIoPicker()=default
catapult::ionet::NodePacketIoPair
A node and packet io pair.
Definition: NodePacketIoPair.h:29