UDP server socket

Donn Cave donn at u.washington.edu
Thu Oct 14 12:23:02 EDT 2004


In article <mailman.4942.1097760523.5135.python-list at python.org>,
 Ajay <abra9823 at mail.usyd.edu.au> wrote:
...
> my question is whether the socket buffers incoming packets, what is the
> size of the buffer and is there any way of increasing it.
> If not, a solution may be to carry the processing in another thread, but
> thats going to increase the overhead (the app. is for a PDA).

I assume you're testing and encountering this result on a PDA, too.
I have never worked with one myself, but I assume that a platform
with more limited resources like that will naturally make more
conservative assumptions about the necessary size of buffers and
so forth.

In a simple test on MacOS X, I find that a stopped server can
wake up and process 100 or so datagrams that had been previously
sent to it, of sort of random length between 1 and 74 bytes.
I expect it could handle a lot more than that, and the same
would be true of any PC or server class Berkeley UNIX or similar.
Of course you would think the datagrams' size would have something
to do with it.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list