Author |
|
HPS Newbie
Joined: 06 August 2013 Location: Germany
Online Status: Offline Posts: 8
|
Posted: 08 February 2017 at 3:27am | IP Logged
|
|
|
Hello,
we are using MailBee.NET POP3 (v10).
is it possible to process parallel downloads of messages (DownloadEntireMessage) on the same instance of the POP3-class?
We want to download messages on the same account without creating a new instance of the class, so that we spare the time for logIn on the new instances. We have to download multiple messages parallel, because we want to create a "bypass". "Small" messages should have the chance to be downloaded even if a "large" (+5MB) is downloading. If we download messages "one after one", a "large" message would block the cue.
I think this is not possible without creating multiple instances/logIns - or do you see a way to do parallel downloads on the same instance/login?
Greetings
Hans-Peter
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 08 February 2017 at 3:45am | IP Logged
|
|
|
You would need multiple threads for that. However, if particular POP3 server supports pipelining, you can use DownloadEntireMessages method to download multiple messages within a single operation, which greatly increases performance and reduces network traffic.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
HPS Newbie
Joined: 06 August 2013 Location: Germany
Online Status: Offline Posts: 8
|
Posted: 08 February 2017 at 4:37am | IP Logged
|
|
|
Hello Igor,
thank you for your answer.
But can I do multithreading on the same instance of the pop3-Class to avoid creating new instances and new logIns?
(Call of DownloadEntireMessages in multiple threads on the same instance of the pop3 class).
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 08 February 2017 at 4:51am | IP Logged
|
|
|
Hi,
You cannot have multi-threading on the same instance. This goes down to sockets. You cannot have multiple data streams simultaneously flowing over the same socket. You need to create a separate socket for each.
Maybe you should reconsider how your code downloads email. Maybe you should re-order your queue. For instance, you first check sizes of all messages you're about to download (this info is available in advance, like UIDs) and then you plan your download strategy. For instance, first you download small messages and the rest of the session you download larger ones.
Trying to open another POP3 connection to the same mailbox will often fail because POP3 protocol does not allow this (although some implementations do).
Regards,
Alex
|
Back to Top |
|
|
HPS Newbie
Joined: 06 August 2013 Location: Germany
Online Status: Offline Posts: 8
|
Posted: 08 February 2017 at 7:41am | IP Logged
|
|
|
Hello Alex,
thank you for your answer. This hepls.
Greetings
Hans-Peter
|
Back to Top |
|
|