Assign IdIOHandlerThrottle to a TidTCPServer?

Assign IdIOHandlerThrottle to a TidTCPServer?

Post by Georgi San » Sat, 20 Nov 2004 13:40:16


Hello
I'm trying to limit the server bandwidth by using a IdIOHandlerThrottle
Is it possible and if Yes then how?
 
 
 

Assign IdIOHandlerThrottle to a TidTCPServer?

Post by Team » Sat, 20 Nov 2004 19:06:36


You have two options:

1) in the OnConnect event, instantiate TIdIOHandlerThrottle dynamically and
assign it to the TIdPeerThread.Connection.IOHandler property.

2) write a descendant class from TIdServerIOHandler, override the Accept()
method to return a new TIdIOHandlerThrottle instance, and then assign the
descendant class to the server's IOHandler property.


Gambit

 
 
 

Assign IdIOHandlerThrottle to a TidTCPServer?

Post by Georgi San » Sun, 21 Nov 2004 06:54:54

Thanks Remy





and