tags:

views:

41

answers:

1

Hi. I'm sending a message to a NNTP server in order to fetch an article's body. I don't want to wait for the answer to complete, cause I only need the first 3 lines from the body. How can I interrupt the transfer and move on to the next article? Now when I request another's article message body, I still get data from the previous one.

The only way that worked for me, was to close the stream and reopen it. In my opinion this is a little bit hardcore, cause I have to login to the server every time I need a new file.

Any help would be appreciated.

Kind Regards.

A: 

Use one or more background threads to retrieve the body of the articles. Build a mechanism into your threads to allow you to cancel a background thread -- if possible.

That will let you click on another article in the list, and populate its display, even if the previous fetch is still running.

Jason D