Re: Simple UDP server

2008-09-10 Thread James Mills
On Thu, Sep 11, 2008 at 10:36 AM, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > For UDP I wouldn't thread or, fork, I'd use select and run > asynchronously. > > http://docs.python.org/lib/module-select.html > > Actually if I really had to do this I'd use twisted. Right tool for > the job! For any

Re: Simple UDP server

2008-09-10 Thread Nick Craig-Wood
Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > I am looking for the right way to write a small and simple UDP server. > > I am wondering between Forking, Threading (found at SocketServer.py) > and the one describes at the snippet below. > > Can you tell me the advanta

Re: Simple UDP server

2008-09-10 Thread James Mills
Tzury, You may consider using pymills to simplify writing your UDP server and just concentrating on the behavior of the system. You can get a copy of the latest development branch by cloning it with Mercurial: hg clone http://hg.shortcircuit.net.au/pymills/ There is an example UDP Server in exa

Re: Simple UDP server

2008-09-10 Thread Tzury Bar Yochay
> Transmitting large binary data over UDP? That makes only sense for few > applications like video and audio streaming. UDP does neither guarantee > that your data is received nor it's received in order. For example the > packages A, B, C, D might be received as A, D, B (no C). > > Can your protoco

Re: Simple UDP server

2008-09-10 Thread Christian Heimes
Tzury Bar Yochay wrote: So what if it is connectionless. It would make sense if you get a load of users who sends large sets of binary data to each other. Transmitting large binary data over UDP? That makes only sense for few applications like video and audio streaming. UDP does neither guaran

Re: Simple UDP server

2008-09-10 Thread Tzury Bar Yochay
On Sep 10, 9:55 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Tzury Bar Yochay wrote: > > Would the one below will be capable of holding 30 concurrent > > connections? > > UDP is a connectionless datagram protocol, so that question doesn't > really make much sense. > So what if it is connectionle

Re: Simple UDP server

2008-09-10 Thread Fredrik Lundh
Tzury Bar Yochay wrote: Would the one below will be capable of holding 30 concurrent connections? UDP is a connectionless datagram protocol, so that question doesn't really make much sense. -- http://mail.python.org/mailman/listinfo/python-list

Simple UDP server

2008-09-10 Thread Tzury Bar Yochay
I am looking for the right way to write a small and simple UDP server. I am wondering between Forking, Threading (found at SocketServer.py) and the one describes at the snippet below. Can you tell me the advantages and disadvantages of each Would the one below will be capable of holding 30