Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: non-blocking request but with a 3 minute timeout
c_klar@c-cs.com

From: Brooklyn, NY USA
Posts: 4
Member Since: 05/25/05
posted May 25, 2005 5:02 PM

how can I make a non-blocking request but still have a 3 minute timeout
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 25, 2005 5:06 PM

You'd have to a set a variable in your app prior to starting the request. Then clear the variable when the request is complete.

You would also have a timer that goes off after 3 minutes that checks if the variable is still set, in which case you Abort the action and raise an error.
c_klar@c-cs.com

From: Brooklyn, NY USA
Posts: 4
Member Since: 05/25/05
posted May 25, 2005 5:34 PM

So you are saying that even though non-blocking is set up through setting timeout to 0, the real timeout will be infinite, is that true?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 25, 2005 7:02 PM

The difference between timeout = 0 and timeout > 0 is that when it's greater than 0 we block until the call fails, timeout has elapsed or the call succeeds. When timeout = 0 we do not block but the call may fail for other reasons in which case you get an error event.

You should probably test all the different scenarios that you are concerned with to see what happens.

c_klar@c-cs.com

From: Brooklyn, NY USA
Posts: 4
Member Since: 05/25/05
posted May 26, 2005 8:49 AM

Thanks Tony,

now how about this question :-)

we've created a control which its function is to upload many files so we're trying to do 4 simeltanious uploads but we've noticed that even though we've fired off all 4 uploads at the same time the progress event will show that only two uploads are active at any given moment (its not strictly the first two) and the remaining two will always say that they started sending or like negotiating.

Does this have to do with your control, or is it a windows setting on the server or client, or last but not least our logic is just wrong :-( ?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 26, 2005 8:55 AM

The HTTP control (the control in the Web Tool) uses WININET.DLL (part of the OS) and I seem to recall that WININET has some limitations on the number of threads an app can use. I think this is what you are experiencing.

We created the WebASP control to allow users to do requests without being dependent on WININET. You may want to take a look at that. To get the WebASP control download and install the Web Enterprise Tool. Note that the Web Enterprise Tool includes both the WebASP and HTTP controls.



c_klar@c-cs.com

From: Brooklyn, NY USA
Posts: 4
Member Since: 05/25/05
posted May 26, 2005 9:18 AM

Thanks Tony, I'll look into this new control in a moment, but BTW as far is you know will I actually get the files uploaded faster by doing simultaneous uploads?

Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted May 26, 2005 9:30 AM

Depends on the network. If you have a 2Mb cable connection and are uploading to a server that supports 500Kb then theoretically you could transfer 4 files as fast one.
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX