getsockopt / setsockopt

Oleg Broytmann phd at phd.pp.ru
Mon Sep 17 07:25:17 EDT 2001


On Mon, Sep 17, 2001 at 11:18:50AM +0000, ppe at albert.com wrote:
> I'm looking for some code example concerning the getsockopt and setsockopt 
> function in the socket module.
> 
> Is there anybody using it and which can send me some code example ? 

   s = socket(AF_INET, SOCK_STREAM)
   s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)

   man setsockopt
   man 7 socket (on Linux) to see all options

Oleg.
---- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list