|
Folks,
I'm fetching and parsing an HTML file with nHTTPLib, and I'd like to
know the appropriate way to terminate the connection (without
producing an error or throwing an exception, preferably). Say that I
only want to process the HEAD element of the HTML -- I'd like to stop
reading the HTML file once I'm done processing the HEAD rather than
reading the rest of the file.
I've read in the Programmer's Guide and Reference about setting a NIL
input-spec via calling SetInputSpec, but it also warns that doing this
from within an active InputSpec may produce an error. I've read about
sending a Cancel message to the endpoint, but I don't know where to
send such a message given that the endpoint is somewhere inside
nHTTPLib.
After I've terminated the transmission, I'm hoping that the rest of
the nHTTPLib processing will end normally, such as receiving an
MConnectionClosed message, etc.
Any ideas or places where I should look for examples?
Gavin
|