[Imap-uw] timeouts for client operations?
mrc at CAC.Washington.EDU
Wed Sep 14 17:05:22 PDT 2005
There are various timeouts that you can set. On UNIX, you can set TCP
open, TCP read, and TCP write timeouts. On Windows, you can set TCP read
and TCP write timeouts. This is done via the SET_OPENTIMEOUT,
SET_READTIMEOUT, and SET_WRITETIMEOUT functions of mail_parameters().
If you fail to arm a timeout handler via SET_TIMEOUT, a timeout will cause
an immediate disconnect. If you arm a timeout handler, then the timeout
handler is able to decide whether to disconnect or dismiss the timeout.
Note that "disconnect or dismiss" are your only two choices; and the only
way that a c-client function will return is if it completes or the session
is disconnected. However, your timeout handler *does* have the option of
doing other tasks, (e.g., updating the screen) prior to dismissing the
The point is that you can't return to the main thread from a timeout
without abandoning the IMAP session.
-- Mark --
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
More information about the Imap-uw