Martin Peach wrote:
The idea is to expand it to fit circumstances as they arise. I hadn't really tried OSC over TCP, so I wasn't aware of this problem. I agree it needs fixing, I'm just not sure of the best way at the moment. It could be simpler to prefix the OSC packet with its length.
That's indeed what is recommended by the OSC specification for stream-based protocols:
http://www.nabble.com/Questions-wrt--OSC-implementation-details.-td1109673.h...
But this makes it more complicated, [packOSC] and [unpackOSC] would need to know whether the data should be sent or is being received from a packet-based protocol or a stream-based protocol, to know whether to prefix the length or not.