newbie udp socket question

Pedro Rodriguez pedro_rodriguez at club-internet.fr
Sun May 11 06:02:42 EDT 2003


On Sun, 11 May 2003 09:38:40 +0000, Pedro Rodriguez wrote:

> 
> Using the select module. Replace your receive statement (not tested) :
> 
>         ins, outs, errs = select.select( [ sock ] , [], [], 1.0)
>         if ins:
>             response = sock.recv(port)

Oops... by the way, 'port' is not what you pass to 'recv' but the
buffer size, and need probably to bind the socket to the address
prior doing the select : sock.bind((address, port))

-- 
Pedro




More information about the Python-list mailing list