Thanks Mark,
You answered all my questions and now I'm minimally savvy on HTTPSocket.
Message: 9
Subject: Re: HTTP Problems
From: Mark Nutter <[EMAIL PROTECTED]>
Date: Tue, 4 Jul 2006 17:31:14 -0700 (PDT)
--- Craig Hoyt <[EMAIL PROTECTED]> wrote:
Once a download has been established and is in progress is it
handled
like a thread? Do I need to do anything else to service the
process?
Yes it's like a thread, and no you don't need to do anything else
(other than have the proper code in the event handlers).
Obviously quitting the app before a download is complete is not
advised, are there any other things to be aware of to not
sabotage the download?
I can't think of anything offhand.
This brings up a second question; I'm currently creating an
instance
of HTTPSocket in the button.action event to initiate the
download.
How do I get access to that instance to be able to monitor
error and
completion status? Is the instance name valid as long as the
download
is in progress?
If you are storing your HTTPSocket in a property of the window,
then it will remain valid. If you are doing
Dim hSocket As new HTTPSocket
then the socket will disappear at the end of the button's Action
event.
I recommend dragging the HTTPSocket into your window as an
"embedded" control. Just drag a TCPSocket into your window and
then change "TCPSocket" to "HTTPSocket" in the properties window.
If you do it this way, you can put all the code you need into
the HTTPSocket's event handlers, and you'll have direct access to
the window's properties, other controls, etc. Plus it will be
easier for other controls (like PushButtons) to refer to your
HTTPSocket. And you never have to worry about it going out of
scope (at least as long as the window is open).
Mark Nutter
Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>