sockets - recv with time out
David Bolen
db3l at fitlinxx.com
Fri Jan 11 01:05:03 EST 2002
westernsam at hotmail.com (sam) writes:
> I know generally this should be handled
> better, but seeing as am working with what I'm given is there a way I
> can do a recv with a timeout (to throw an exception, when the timeout
> is reached)? Is this something that can be achieved with non-blocking
> sockets and if so how?
Typically you'd select() on the socket before doing the recv() - the
select() can have a timeout. Shouldn't be any particular need for
non-blocking sockets.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list