News for hackers. Stuff that matters.
Re:ZeroMQ is just sockets by lttlrck on Friday November 15, 2013 @04:58PM (#6742428)
Can you elaborate on why pausing on sending is particularly tricky when sending a multi-byte length header compared to say pauses on any other part of the payload?
Re:ZeroMQ is just sockets by unoti on Friday November 15, 2013 @08:20PM (#6743161)
It's particularly tricky when dealing with async code, where you can't simply say "block here till you have 4 bytes." If you're just getting in events that say "you received n bytes and here they are."
Re:ZeroMQ is just sockets by mattgreenrocks on Saturday November 16, 2013 @07:51AM (#6744574)
All networking code should work even if it receives 1 byte at a time. Use a buffer, and have some sort of abstraction responsible for packetizing the input. The output of that module is a fully formed frame ready for interpretation.