Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 May : Need help with IdIOHandleThrottle on server side
| Subject: | Need help with IdIOHandleThrottle on server side |
| Posted by: | "York" (no) |
| Date: | Thu, 10 May 2007 17:03:53 |
Hello
I am trying to implement the following posted by Remy a few months ago
Throttle := TIdIOHandlerThrottle.Create(AThread.Connection);
Throttle.BytesPerSec := 1024;
{ TIdTCPConnection owns the initial TIdIOHandler, so reassign the
ownership so the IOHandler is not freed when changing the
property...}
Throttle.InsertComponent(AThread.Connection.IOHandler);
Throttle.ChainedHandler := AThread.Connection.IOHandler;
TIdTCPConnectionAccess(AThread.Connection).FFreeIOHandlerOnDisconnect :=
False;
AThread.Connection.IOHandler := Throttle;
After the code above when I try to access AThread.Connection.Socket it
returns nil
Could you help me please to throttle the connection on the server side
Thank you