|
|
|
|
|
by jchw
995 days ago
|
|
That does leave one problem: you still need a way to segment your stream. Most length-prefixed framing schemes do not have any way to segment the stream other than the length prefix. What you wind up wanting is something like chunked encoding. (Also, using zero as a sentinel is not necessarily a good idea, since it makes zero length messages more difficult. I'd go with -1 or ~0 instead.) |
|
I thought -0 is only something in floating point numbers, not integers, and using floats for the length of a message sounds like a nightmare to me.