Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
incoming UDP packets truncated to 4096 bytes (theoretical maximum is ~65535 bytes) #903
given a patch:
if i feed this patch 2048 bytes using the following command, it will only receive
$ dd if=/dev/zero bs=2048 count=1 | nc -u localhost 9000
if i instead replace
this might be a regression triggered by #715
Can't reproduce here (on Windows). Are you sure that you're using current master? I actually increased the buffer for binary netreceive from MAXPDSTRING (=1000) to INBUFSIZE (=4096), so that binary and FUDI have the same size restriction.
With current master I can send/receive UDP packets up to 4096 bytes. Above that, Pd will segfault (which is another issue, I'll push a fix).
i was using Pd-0.50-2 (not
however: a UDP package has a possible maximum length of 65535 bytes. it there any reason to not allow this maximum size?
the original issue (limit=1000) is therefore already fixed. however, since the follow-up issue (limit=4096) is almost identical, i'll leave this ticket open and re-title it.
I think it just makes the implementation easier. Having a 65KB buffer on the stack doesn't feel right. There are of course other solutions:
On the other hand, the limit for binary UDP packets has been 1000 bytes like forever and nobody seemed to notice, let alone complain. Now the limit is 4 times as high. Of course the theoretical limit for UDP packets is 65535 bytes, but in practice it's not recommended to send UDP packets larger than the network MTU. I'm not against supporting larger UDP packets, but maybe wait till someone really needs it?
@danomatika Maybe doublecheck.