orimarc wrote:How is this
- Code: Select all
uint64_t testGUID;
memcpy(&testGUID, &recv_data[0], recv_data.size());
returning more than 8 bytes of data? I guess if you pack the sends together this might happen. The receive class should buffer until it receives an entire packet. With the exception to the size itself. I guess I could modify that to handle random amounts of data returned.
I mean in theory if this just returned 2 bytes instead of 4
- Code: Select all
int size = 0;
int result = 0;
result = SDLNet_TCP_Recv(m_receiveSocket, &size, sizeof(int));
The code would fall over.
I DIDN'T WRITE THAT. So, next time you're in the forum, make sure you're not somehow logged in as another user.