updates by buttocks by fixing uneven bytes recv

This commit is contained in:
christian
2021-05-01 00:44:48 +02:00
parent a29a884671
commit 2eb343d6e0
2 changed files with 62 additions and 49 deletions
+5 -1
View File
@@ -8,7 +8,7 @@
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 3.0, as published by the
* Free Software Foundation.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
@@ -139,6 +139,8 @@ public:
void OnGameFrame(bool simulating);
bool OnBroadcastVoiceData(IClient *pClient, int nBytes, char *data);
void ListenSocket();
private:
int m_ListenSocket;
@@ -149,6 +151,8 @@ private:
size_t m_LastLength;
double m_LastValidData;
bool m_New;
bool m_UnEven;
unsigned char m_Remainder;
} m_aClients[MAX_CLIENTS];
struct pollfd m_aPollFds[1 + MAX_CLIENTS];