I am not sure if the above links provides UDP "Broadcast". What I have in mind is a client that is able to send an UDP message that will be received by a group of servers listening to the same certain port (of course, in difference computers of the same network). From what I could understand from the examples above, there is not much of a difference between the UDP approach and a regular TCP approach where the client must know in advance the IP of the server.
Main Topics
Browse All Topics





by: peprPosted on 2006-09-19 at 21:01:56ID: 17558038
Focus on the built-in module socket (Python doc "7.2 socket -- Low-level networking interface"). See the examples:
ython/sock ets/server .py ython/sock ets/client .py
http://www.qiksearch.com/p
http://www.qiksearch.com/p
They are a bit old and could be written aestetically better, but they show the principle. (Add the line UDPSock.sendto('', addr) before the break to finish the server when sending empty line.)
Later, you may get info and inspiration in the standard module SocketServer Python doc ("11.16 SocketServer -- A framework for network servers")