[chuck-users] OSC reliability issues
garton at columbia.edu
Thu Jan 25 13:15:18 EST 2007
On Thu, 25 Jan 2007, David Michael wrote:
> In my particular application, timing isn't critical - but receiving
> the message is (TCP).
I wonder about something -- this is based on really ancient knowledge
(like 10+ years ago...) and contemporary implementations of socket-reading
code may just Do the RIght Thang, but I recall sometimes having to do
repeated reads on a socket to get the full packet, especially if some
'non-standard' size was being transmitted. Something like this:
amt = read(ns, (void *)sptr, sizeof(struct sockdata));
while (amt < sizeof(struct sockdata))
amt += read(ns, (void *)(sptr+amt), sizeof(struct sockdata)-amt);
I also haven't looked at cHUcK's implementation of of the socket stuff.
More information about the chuck-users