News for hackers. Stuff that matters.
Re:What developers should know about TCP by userbinator on Saturday May 16, 2020 @02:24AM (#23200932)
A 16-bit length (64k max message size) is usually sufficient, or even 24-bit (16M max) if you really feel the need, but 32 bits is far more than should be needed for parsing messages in memory; it would be fine for a streaming application, however (in which case a 64-bit length wouldn't be a bad idea either.)
Re:What developers should know about TCP by kccqzy on Saturday May 16, 2020 @03:48AM (#23201313)
Good advice. I was actually referring to this: https://rachelbythebay.com/w/2016/02/21/malloc/ I read this article a long time ago, and yet I made a similar mistake in my own code.