views:

88

answers:

2

I would like to find out if Twisted imposes restriction on maximum size of UDP packets. The allowable limit on linux platforms is upto 64k (although I intend to send packets of about 10k bytes consisting of JPEG images) but I am not able to send more than approx. 2500 bytes

A: 

Are you sure that it is not a receive problem?

There is no indication that your packets won't be fragmented en route to the destination

Eric
A: 

It's very unlikely that Twisted is imposing any limit but there's no reason some other part of the network wouldn't drop the packets if they're too large. It's very rare for people to send UDP packets of such a large size for precisely that sort of reason. Most game applications for example try to keep them below 1.5K these days, and below 512 bytes in the not-too-distant past.

Kylotan
Thanks for the reply! I am actually streaming Mjpeg video stream and trying to send one picture at a time. And right now, i am doing this on the localhost itself. (receiver and sender on the same machine, different ports) My thoughts are that twisted should take care of fragmenting the string tht i am trying to send. I think the max limit tht can be sent is somewhere around 7800 bytes.
faddy
It's likely that Twisted can perform the task of fragmenting and coalescing the packets for you but it will depend entirely on how you're using it. Typically you layer protocols on top of the underlying connection to achieve this extra functionality on top of raw UDP. You might get some specific help from Twisted experts if you post your actual code, perhaps in a new question.
Kylotan