[Twisted-Python] UDP asynchronous communication

Adrian Libotean adrian.libotean at asylum-studios.ro
Sun Apr 10 10:13:18 MDT 2005


A few reasons for this are:

1. I can have multiple servers running on the same machine (single Ip 
address) on different ports
2. The server must reply with more than just an IP: it sends to the 
client specific data: amonst wich is the TCP port that the server is 
listening for connections from the client which can vary according to 
settings

jarrod roberson wrote:
> On Apr 10, 2005 9:13 AM, Adrian Libotean
> <adrian.libotean at asylum-studios.ro> wrote:
> 
>>Hello,
>>
>>First of all I must let you know that I am new to Twisted.
>>
>>I need to implement a server discovery mechanism for my application. The
>>way I chose to implement it is this:
>>
>>        1. The client, when started, sends a broadcast message requesting
>>servers to make their presence known (UDP broadcast)
>>        2. The server responds to this request using the same port on the
>>sender's IP to reply (UDP normal message)
>>        3. ...
>>
>>Now the problem I faced is that from the examples I found on the web
>>(http://twisted.sourceforge.net/TwistedDocs-1.1.0/howto/udp.html), for
>>multicast UDP messages, are done using listenUDP on both sides (server
>>and client) and this approach is not good for me because I need a
>>non-blocking communication mechanism on the client-side.
>>
>>_______________________________________________
> 
> 
> Why are you re-inventing the wheel, Dynamic Server discovery is
> already implemented with
> ZeroConf ( also known as Rendezvous on OSX ) thru mDNS.
> 
> I have working example code for twisted that I got form people on this
> list if you want to see it.
> 




More information about the Twisted-Python mailing list