UDP packet size

Blitz3D Forums/Blitz3D Programming/UDP packet size

LAB[au](Posted 2005) [#1]
it seems that udpstreams are limited to more or less 8000 bytes, above that sendudpmsg fails to send the stream. Does anyone knows about this limitation?


KuRiX(Posted 2005) [#2]
There is a limit on the UDP packet size. I thought it was about 2500, but could be what you say.

Here you can read about the maximum datagram packet size:

http://forum.java.sun.com/thread.jspa?threadID=668796&messageID=3914070

You need to split your message into sub packets to avoid this limit...

Good Luck, Cheers, KuRi


LAB[au](Posted 2005) [#3]
Thanks for the info, according to my tests, the largest UDP packet you can send under winXP+Blitz3D is 8192 bytes, minus the 28 bytes for IP/UDP headers that makes that the maximum packet you can send is 8166 bytes (tested succesfully).


t3K|Mac(Posted 2005) [#4]
this should be fairly enough data per packet.


LAB[au](Posted 2005) [#5]
Not if you are trying to send 320*240 RGBA image.


Mighty Raven(Posted 2005) [#6]
Thanks alot for the info, I'm ready to try my first test the BB network.


Mighty Raven(Posted 2005) [#7]
Thanks alot for the info, I'm ready to try my first test with the networking in BB.


KuRiX(Posted 2005) [#8]
LAB, just divide the image and send 4 or more packets... along with a number packet, then you can reconstruct the image at the other side :D

Or use my free Raknet wrapper that does this for you!


LAB[au](Posted 2005) [#9]
Yep Kurix I have solved it this way, with numbered packets, altough it took me some time to understand what was going wrong, until I found the UDP packet size limitation.


Techlord(Posted 2005) [#10]
508 bytes for optimum performance.