Background: I am sending data by mina web socket (http://ift.tt/1J7t5Q0) which is already patched the buf issue..
I used to send the json message through the web socket around 50 bytes.. sometimes, it will goes up to 70 bytes...
The problem is: at initial, the IOBuffer.capacity() is 2048 --> 2048 --> 1024 --> 1024 -> 512 -> 512 -> 256 -> 256 -> 128 -> 128 -> 64 -> 64 -> 64 -> 64
If the json message becomes 70 bytes. It will split into two message in messageReceived(IoSession session, Object message). Is there any way that i can solve this problem.
I can store the incomplete message, but it will raise another issue such as 2 json messages or 1 valid json message with 1 invalid json message.
Thanks.
Aucun commentaire:
Enregistrer un commentaire