Archived Forum Post

Index of archived forum posts

Question:

iOS Chilkat: Is there any defalut timeout for Login method of CkoImap class?

Jul 16 '14 at 09:25

How can i maintain a continuous connection with imap/pop server?


Answer

The ReadTimeout property applies to the Login method exactly the same as it applies to any other method. The online reference documentation was updated to make this more clear:

The ReadTimeout is the maximum amount of time (in seconds) that incoming data is allowed to stall while reading any kind of response from an IMAP server. This is the amount of time that needs to elapse while no additional response bytes are forthcoming. For the case of long responses, if the data stream halts for more than this amount, it will timeout. This property is not a maximum for the total response time, but only a maximum for the amount of time while no response arrives.

To maintain a continuous connection, you might periodically send a NOOP command (via the Noop method) to keep the server from closing an idle connection. Alternatively, you might use the IDLE functionality (see the online reference documentation and examples)