MADARA  3.4.1
TransportContext.cpp
Go to the documentation of this file.
1 #include "TransportContext.h"
3 
5  uint64_t receive_bandwidth, uint64_t send_bandwidth, uint64_t message_time,
6  uint64_t current_time, const std::string& domain,
7  const std::string& originator, const std::string& endpoint)
8  : operation_(operation),
9  receive_bandwidth_(receive_bandwidth),
10  send_bandwidth_(send_bandwidth),
11  message_time_(message_time),
12  current_time_(current_time),
13  domain_(domain),
14  originator_(originator),
15  endpoint_(endpoint)
16 {
17 }
18 
20  const TransportContext& rhs)
21  : operation_(rhs.operation_),
22  receive_bandwidth_(rhs.receive_bandwidth_),
23  send_bandwidth_(rhs.send_bandwidth_),
24  message_time_(rhs.message_time_),
25  current_time_(rhs.current_time_),
26  domain_(rhs.domain_),
27  originator_(rhs.originator_),
28  endpoint_(rhs.endpoint_),
29  records_(rhs.records_)
30 {
31 }
32 
34 
36 {
37  if (this != &rhs)
38  {
39  operation_ = rhs.operation_;
40  send_bandwidth_ = rhs.send_bandwidth_;
41  receive_bandwidth_ = rhs.receive_bandwidth_;
42  message_time_ = rhs.message_time_;
43  current_time_ = rhs.current_time_;
44  domain_ = rhs.domain_;
45  originator_ = rhs.originator_;
46  endpoint_ = rhs.endpoint_;
47  records_ = rhs.records_;
48  }
49 }
Provides context about the transport.
std::string domain_
Networking domain.
int64_t operation_
Operation being performed.
uint64_t receive_bandwidth_
Bandwidth being utilized for receive operations.
uint64_t message_time_
Message timestamp.
std::string originator_
Originator of the current message.
knowledge::KnowledgeMap records_
Context specific records.
std::string endpoint_
Public endpoint of the current message.
uint64_t current_time_
Current timestamp.
void operator=(const TransportContext &rhs)
Assignment operator.
uint64_t send_bandwidth_
Bandwidth being utilized for send operations.
TransportContext(int64_t operation=IDLE_OPERATION, uint64_t receive_bandwidth=0, uint64_t send_bandwidth=0, uint64_t message_time=0, uint64_t current_time=utility::get_time(), const std::string &domain="", const std::string &originator="", const std::string &endpoint="")
Constructor.
constexpr string_t string