I use URLSream to receive images from an IP-Camera. If I use it without timeout, the time for URLSream.get() and receive the hole image with URLStream.read() is about 20 mS. If I set a timeout (1000 mS), it takes about 800 mS to receive the imge.
I have the same problem if I use tcpstream and read the http-header by my self.
Have I something misunderstood?
My system: WinXP SP2, VS.NET 2003, commonC++ 1.2.6
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use URLSream to receive images from an IP-Camera. If I use it without timeout, the time for URLSream.get() and receive the hole image with URLStream.read() is about 20 mS. If I set a timeout (1000 mS), it takes about 800 mS to receive the imge.
I have the same problem if I use tcpstream and read the http-header by my self.
Have I something misunderstood?
My system: WinXP SP2, VS.NET 2003, commonC++ 1.2.6
Andreas
What does your code with timeout look like?
I use the demo 'urlfetch".
I add the following code to the class myURLStream:
public:
myURLStream( timeout_t to=0 ) : URLStream( IPV4, to )
{
}
In the main function I changed the first line to:
myURLStream url( 1000 ); // 1 second timeout
I remove all console output.
I start time measuring before the get command and end after url.close(),