Newbie question: SOLVED (how to keep a socket listening), but still some questions

Grant Edwards grante at visi.com
Fri Jun 24 21:36:56 EDT 2005


On 2005-06-25, Giovanni Tumiati <giovanni at poseidon.home.net> wrote:

> However some of my questions still remain from earlier post:
> (1) What is the difference between 
>  - setdefaulttimeout(timeout)

That sets the timeout for any sockets created in the future.

>  - settimeout(value)

That sets the timeout for an individual socket.

> how should they be used?

Use the former if you want the same timeout for all sockets.
Use the latter if if you want to set them individually for each
socket.

Is the documentation unclear?

> (2)Does one have to do a socket.shutdown() before one does a
> socket.close??

No.

[I've never figured out why one would do a shutdown RDWR
rather than close the connection, but I haven't put a lot of
thought into it.]

-- 
Grant Edwards                   grante             Yow!  -- I love KATRINKA
                                  at               because she drives a
                               visi.com            PONTIAC. We're going
                                                   awaynow. I fed the cat.



More information about the Python-list mailing list