kremuwa
28th July 2010, 14:54
Hello.
In my peer2mail client, each file added to download starts a new thread and in this thread it establishes connection with the pop3 server, checks attachments' names using TOP command and then starts to download proper mails using RETR command, one by one. But I want to add an option for an user to stop the downloading process of specific file immediately and remove all the info related to that file from the user interface. I know how to do the interface part but I'm wondering what should I do to stop downloading mails immediately - should i use QUIT command (don't think so, cause it'll probably not work while reading the responce for RETR command)? Or should I call abort() function to disconnect immediately? What do you think?
Thank you in advance.
In my peer2mail client, each file added to download starts a new thread and in this thread it establishes connection with the pop3 server, checks attachments' names using TOP command and then starts to download proper mails using RETR command, one by one. But I want to add an option for an user to stop the downloading process of specific file immediately and remove all the info related to that file from the user interface. I know how to do the interface part but I'm wondering what should I do to stop downloading mails immediately - should i use QUIT command (don't think so, cause it'll probably not work while reading the responce for RETR command)? Or should I call abort() function to disconnect immediately? What do you think?
Thank you in advance.