Hello ICS Mailinglist,
this is a bugreport that on localhost the windows kernel reads megabytes
before a TWSocket client can block. As you can see on the following
and the images on
, the problem is the windows kernel:
"client_internet.png" shows that if I upload with a TWSocket Client (see
a Linux server which blocks immediately then the client also blocks
after the first write.
If I use exactly this client.pas to upload to a simple TWSocket Server
on localhost then it first blocks after 16 Megabytes! (about 1600 writes
of a 100 KB
buffer!) See client_localhost.png. If you look at the "memory_use_2.png"
you can see
that the processes do not consume the memory sent! Not the client and
also not the
server! So this is a issue of the windows kernel,
Do you all agree?
Any idear how to fix this, so the client blocks immediatly as it does on
> WOW! I have another prove for Buffering of Winsock! The used Memory is
> NOT increasing
> at alll! This means that the WINDOWS KERNEL is caching this!!!
>>> Ok, this proves that Winsocks is buffering megabytes of data before
>>> "TWSocket.pause" becomes active!
>> Not quite correct, TWSocket.Pause becomes active immediately, however
>> winsock obviously continues to buffer incomming data, in this case I
>> think there's not much you can do and that won't be related to async
>> sockets IMO. TWSocket.Pause just stops winsock event notification.
>>>> Do you use LineMode? I do not think so but
>>>> should be asked anyway. If LineMode is turned on the component
>>>> indeed buffers data internally.
>>> I am not using LineMode. If you look at TriggerDataAvailable you'll
>>> see that it never
>>> gaves the DoRecv in AsyncReceive a change to read. So I think it is
>>> proved that the
>>> problem is in Winsock, do you also think so?
>> I doubt that it was a problem at all. Winsock does a lot of things in the
>> background you cannot control, even when the socket handle is already
>> 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