CatapultServer  v0.5.0.1 (Elephant)
NodeNetworkTimeRequestor.h
Go to the documentation of this file.
1 
21 #pragma once
25 
26 namespace catapult { namespace timesync {
27 
31 
32  static constexpr auto Friendly_Name = "network time";
33 
35  return api::CreateRemoteTimeSyncApi(packetIo)->networkTime();
36  }
37  };
38 
41 
43  std::shared_ptr<NodeNetworkTimeRequestor> CreateNodeNetworkTimeRequestor(
44  const std::shared_ptr<thread::IoThreadPool>& pPool,
45  const crypto::KeyPair& keyPair,
46  const net::ConnectionSettings& settings);
47 }}
CommunicationTimestamps.h
catapult::timesync::CommunicationTimestamps
Represents the network timestamps for sending and receiving a time synchronization request / response...
Definition: CommunicationTimestamps.h:29
catapult::net::ConnectionSettings
Settings used to configure connections.
Definition: ConnectionSettings.h:31
catapult::net::detail::AlwaysCompatibleResponseCompatibilityChecker
A default compatibility checker that indicates all responses are compatible.
Definition: BriefServerRequestor.h:36
catapult::net::BriefServerRequestor
Definition: BriefServerRequestor.h:48
BriefServerRequestor.h
catapult::timesync::NodeNetworkTimeRequestPolicy::Friendly_Name
static constexpr auto Friendly_Name
Definition: NodeNetworkTimeRequestor.h:32
catapult::ionet::PacketIo
An interface for reading and writing packets.
Definition: PacketIo.h:31
catapult::crypto::KeyPair
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
NodeNetworkTimeRequestor.h
catapult::thread::future
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
catapult::timesync::CreateNodeNetworkTimeRequestor
std::shared_ptr< NodeNetworkTimeRequestor > CreateNodeNetworkTimeRequestor(const std::shared_ptr< thread::IoThreadPool > &pPool, const crypto::KeyPair &keyPair, const net::ConnectionSettings &settings)
Creates a node network time requestor for a server with a key pair of keyPair using pPool and configu...
Definition: NodeNetworkTimeRequestor.cpp:25
catapult::timesync::NodeNetworkTimeRequestPolicy
Node network time request policy.
Definition: NodeNetworkTimeRequestor.h:29
RemoteTimeSyncApi.h
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::api::CreateRemoteTimeSyncApi
std::unique_ptr< RemoteTimeSyncApi > CreateRemoteTimeSyncApi(ionet::PacketIo &io)
Creates a time sync api for interacting with a remote node with the specified io.
Definition: RemoteTimeSyncApi.cpp:72
catapult::timesync::NodeNetworkTimeRequestPolicy::CreateFuture
static thread::future< ResponseType > CreateFuture(ionet::PacketIo &packetIo)
Definition: NodeNetworkTimeRequestor.h:34