Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jan : Re: Monitor the reading?
| Subject: | Re: Monitor the reading? |
| Posted by: | "York" (offi..@onlinebg.info) |
| Date: | Wed, 18 Jan 2006 08:42:57 |
> Why aren't you including the receiving of the header in your calculations?
- Well that's the point. Since Indy's RedBuffer methods get data from the
memory buffer and if there is no data in the memory buffer they wait till
data is available.
In my case the header and the data are written one after another from the
server side. So i thought that if the header comes it means that the server
has already sent all it has to. So now the delay will be calculated only
over the time the following data arrives.
for example Headr is 32 bytes and following data may be 130KB
so when tcpFile.ReadBuffer(Command, SizeOf(TCommand)) returns the header
then the data is following for sure. So now the time for
tcpFile.ReadStream(Ms, Command.DataSize); is what I need to measure.
Isn't that a good approximation for the speed?