Chilkat Forum

Technologies => Email Protocols => Topic started by: will.blackburn on May 25, 2018, 12:05:20 PM

Title: Chilkat.Imap - One long running instance or short lived ones as needed?
Post by: will.blackburn on May 25, 2018, 12:05:20 PM
Apologies if this seems an obvious answer...  :-[

... But I've been trying to work out if it's better to create a single long lived instance of the Imap object that exists over the entire Program or Thread/Task or if I should create an instance at the time I need the email information during the programming process.

Thinking it through and reading the RFC documents, I believe that a long running instance is the way to do it as long as the connection is kept alive or checked and re-connected to as required, but there isn't a clear explanation that I've found and each of the examples always Chilkat gives only show a single process with no reference as to how much "work" is acceptable for the instance.  ???

Any pointers or advice or just confirmation would be great...
Title: Re: Chilkat.Imap - One long running instance or short lived ones as needed?
Post by: Chilkat on May 25, 2018, 02:46:26 PM
I think keeping the connection long-term is the best way to go.  It might be a good idea to call imap.Noop once every few minutes when there is no activity.