Questions about TCP sending and packet size

I actually made something very like this for my UDP library :slight_smile:
Thanks for the offer though!

Always always always check every single byte of data that comes over a network for validity. ints fine but enforce maximum size, etc.

Cas :slight_smile:

Well there is your problem. is.read(byte[] data) is not is.readFully(). read(byte[] data) will block and read at least one byte or more, but does not block to fill the array, so you would often get partial fills, the rest would be old data in the array.

TCP really does take care of everything. Its just streams. But you still must use the streams correctly.

And don’t cross the streams. Because that would be bad. ;D

WIN!!! ;D ;D ;D

… sorry for hijacking the thread … going back to hiding now :persecutioncomplex: