💩
This commit is contained in:
@@ -52,14 +52,16 @@ void Connection::getPacks(SOCKET sock) {
|
||||
Input in;
|
||||
while (true) {
|
||||
lsPck = recvPacksFrom(sock, &m_buf, m_addr);
|
||||
|
||||
for (auto& pck : lsPck) {
|
||||
uint32_t bsize = m_buf.len - (pck - m_buf.ptr);
|
||||
switch (netprot::getType(pck, 1)) {
|
||||
using enum netprot::PACKET_TYPE;
|
||||
case INPUT:
|
||||
if (Deserialize(&in, pck, &bsize))
|
||||
if (Deserialize(&in, pck, &bsize)) {
|
||||
m_input_manifest[in.timestamp] = in;
|
||||
if (in.keys.forward == true)
|
||||
std::cout << "!!!!";
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
@@ -71,7 +73,7 @@ void Connection::getPacks(SOCKET sock) {
|
||||
void Connection::sendPacks(SOCKET sock, std::unordered_map<uint64_t, Connection*> conns) {
|
||||
while (m_last_out < m_output_manifest.size()) {
|
||||
Output out = m_output_manifest.at(m_last_out++);
|
||||
|
||||
std::cout << "bip";
|
||||
for (auto& [key, conn] : conns) {
|
||||
if (m_playinfo.id == conn->GetHash(true))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user