07-13-2014, 10:06 PM
(This post was last modified: 07-13-2014, 10:09 PM by daniel0916.)
Okay, thanks.
Is this code right? Because the client disconnects because it's too big. I think i need to define on the Write method the writed size not the full size or?
Code:
char Output [1000000];
uLongf BufferSize = sizeof(Output);
int success = uncompress((Bytef *)Output, &BufferSize, (const Bytef *)ChunkData.data(), (uLong)DataLength);
if (success != Z_OK)
{
return false;
}
if (!Packet.Write((const char *)Output, (size_t)BufferSize))
{
return false;
}
Is this code right? Because the client disconnects because it's too big. I think i need to define on the Write method the writed size not the full size or?