timeout on connect(2) call?

Marcus J. Ranum mjr at decuac.dec.com
Thu Feb 7 05:17:26 AEST 1991


	Someone a few days ago was asking if there's a way to set a timeout
on a connect(2) call - similarly to the timeouts you can set in a select(2).
Did anyone have an answer to this? Turns out I need to do something similar.
TFM says if you try to connect on a nonblocking socket, you'll get an
EWOULDBLOCK if it would block - but I'd like to be able to specify the time
a little more precisely. Is there an elegant way to do this?

mjr.



More information about the Comp.unix.programmer mailing list