Markus Müller wrote: > Hi Arno Garrels, > > I looked over the code of "THttpCli" and if you do not have a > connection from localhost to localhost it may work... I expect this > in particular cause the read of Megabytes is done within split > seconds,
Yes, it is very fast. > also if my program is sleeping (for example on a breakpoint > in Delphi). How do you manage this? If the application stops at a breakpoint it can no longer receive data. > > The problem is that the read occures within miliseconds because > localhost does > not have any latency. In the case of THttpCli ther there is a 1000ms > timer: I think > this is much too slow to prevent the reading of so many data > (Megabytes!) within > this small time, isn't it? Yes, that's why THttpCli has a property BandwidthSampling which sets the timer interval. > > In my Client ICS Proxy software I have my own Message Loop, I don't > juse socket.MessageLoop but process the messages in .Execute of my > Thread by myself. If the problem would be the messages, then I would > be able to ignore them there... But the read is done if my Client > sleeps (for example on a breakpoint) or not! So I think the messages > are not the problem... That's correct, a little bit later, after I wrote my previous replay, I recalled that after Pause a flag is set internaly and the component ignores those notification messages still waiting in the application message queue when this flag is set. > Maybe it is a general Winsock problem about > Async read? I don't think so, the component only reads from the socket when it gets a notification message. > Is it possible to put a Socket > into a Sync read? Possible yes ( with winsock API ), however I would not recomment doing that. Have you tried option wsoNoReceiveLoop yet? -- Arno Garrels > Thanks in advance for any hints... I am completely frustrated about > this problem... I just wanted to implement Flowcontrol into my > Application, which I have developed over a month... And now I must > search for a completely new network framework and must begin from > root? :-( > > Much regards, > Markus Mueller >> Markus Mueller wrote: >> >> >>> it buffers sometime within 2-4 MByte before "socket.pause" does >>> help, my >>> >>>> 3 Ghz Dualcore >>>> >>> seems to buffer also hunderts of MByte... >>> >> >> procedure TCustomWSocket.Pause calls winsock API WSAAsyncSelect. >> It simply tells winsock to stop posting notification messages. >> >> "Although WSAAsyncSelect immediately disables event message posting >> for the socket in this instance, it is possible that messages could >> be waiting in the application message queue. Therefore, the >> application must be prepared to receive network event messages even >> after cancellation." >> >> That's most likely what you observe, isn't it? >> >> BTW: The THttpCli component supports bandwidth control, search for >> "UseBandwidthControl". >> >> -- >> Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be