TehGimp/KerbalMultiPlayer — pull request #536 by godarklight (2013-12-29 09:28:34+00:00)
Title: Implement message splitting

I'm unsure if we really want this, but I can see it being very helpful for users on slower connections.

This will split any messages taken out of the low priority queue into smaller pieces if it is bigger than SEND_BUFFER_SIZE (Perhaps I should rename that variable, it became unused when I implemented message queue sorting).

Pros:
High priority messages can get into the TCP stream in 8kb intervals. This means you only need to download 8kb until you can see someones chat message during a sync.

Cons:
There will be many more calls to asyncSend for big messages. This in theory will increase CPU load, but I don't think it will even be noticeable.
Larger overhead on TCP. I don't think we care about 20 bytes in for every 8kb though?