15 lines
451 B
C++
15 lines
451 B
C++
#include "RemotePeer.hpp"
|
|
|
|
|
|
RemotePeer::RemotePeer(const sockaddr_storage& address, const socklen_t addressLength, const Peer& peer) {
|
|
this->address = address;
|
|
this->addressLength = addressLength;
|
|
this->information = peer;
|
|
|
|
this->latestConnection = std::chrono::system_clock::now();
|
|
this->latency = std::chrono::high_resolution_clock::duration::max();
|
|
}
|
|
|
|
void RemotePeer::update(const Peer& peer) {
|
|
this->information = peer;
|
|
}
|