Vice City: Multiplayer

VC:MP Discussion => Support => Bugs and Crashes => Topic started by: habi on Jul 20, 2023, 10:33 AM

Title: [Limitation]Streams get trimmed by server
Post by: habi on Jul 20, 2023, 10:33 AM
Description
Long streams (> 4096) (send by client ) are reduced to a size of 4095 by the server.

Reproducible
Always

What you were doing when the bug happened
I was passing a whole table with its keys and values formatted as string to server. The size was over 5000. The  void (*OnClientScriptData) (int32_t playerId, const uint8_t* data, size_t size); of api ensures size to be size_t, but only 4095 bytes are saved.

What you think caused the bug
Server did not allocated enough memory.
Title: Re: [Limitation]Streams get trimmed by server
Post by: habi on Jul 29, 2023, 05:12 AM
It is not with the squirrel plugin,
because if you
printf("%d", size);inside a plugin, it shows 4195 / 96.
The command being inserted in
void (*OnClientScriptData) (int32_t playerId, const uint8_t* data, size_t size);callback.
I have this software called wireshark and it showed me the full message send by client.