Début sockets.
This commit is contained in:
31
SQCSim-srv/connection.cpp
Normal file
31
SQCSim-srv/connection.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "connection.h"
|
||||
|
||||
Connection::Connection(in_addr addr,
|
||||
std::string name,
|
||||
UINT64 hash,
|
||||
UINT64 self_hash,
|
||||
UINT64 team_hash):
|
||||
m_addr(addr),
|
||||
m_hash(hash),
|
||||
m_shash(self_hash),
|
||||
m_thash(team_hash),
|
||||
m_name(name) {
|
||||
|
||||
}
|
||||
|
||||
Connection::~Connection() {
|
||||
|
||||
}
|
||||
|
||||
in_addr Connection::GetAddr() const { return m_addr; }
|
||||
|
||||
UINT64 Connection::GetHash(bool self) const { return self? m_shash: m_hash; }
|
||||
|
||||
UINT64 Connection::GetTeamHash() const { return m_thash; }
|
||||
|
||||
std::string Connection::GetName() const { return m_name; }
|
||||
|
||||
void Connection::Clean(std::chrono::system_clock::time_point time) {
|
||||
while (m_input_manifest.front().timestamp < time || !m_input_manifest.empty())
|
||||
m_input_manifest.pop_front();
|
||||
}
|
Reference in New Issue
Block a user