---- Original Message ---- From: "Arno Garrels" <[EMAIL PROTECTED]>
> I've just more or less copied and pasted the bandwidth control stuff > from HttpProt.pas to FtpProt.pas, enabled it on the data channel only > so far. I couldn't find a note who contributed this code? > Also, should I enable it on the control channel as well?? Could I suggest to create a descendent component from TFtpSrv - something like TFtpSrvThrottled - to implement bandwidth-limiting? The current implementation (if it is like in HttpProt.pas) doesn't fit my needs (and probably that of others, too) - e.g. if one needs to implement overall or single-connection throttling. If all is packed into the "base" component then there is no way around duplicate code in the compiled exe - however if it is in a derived component then one can simply select to choose TFtpSrvThrottled or TFtpSrv. Moreover I think it would definitely help to improve code-"readability" if not everything is packed into the base component. For FTPSrv I could offer an implementation based on Dan's ThrottledWSocket (see http://www.xantorrent.pwp.blueyonder.co.uk/ics/ThrottledWSocket.zip) which doesn't touch anything in the base FtpSrv.pas - and therefore is completely based on inheritance (I really like it that way and could leave the throttling-code untouched since 2003, although I updated ics more than once in this timespan ;) Code can be found at http://www.feldtech.com/downloads/uThrottledFTP.pas (taken directly out of a project - so no examples...) - please note that I didn't check if my "extensions" are compatible with ics-ssl (I fear not, since I'm "hijacking" DoRecv(), which is used in ssl-implementation too). ps: I think creating a descendent component for HttpSrv would also be a good idea... -- Peter Feldbaumer p dot feldbaumer at utanet dot at -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be