How can I monitor / limit network traffic used by

2019-05-28 10:10发布

I would like to be able to measure network traffic and limit it.

I'm looking for something that lets me know between two calls how much data has been sent and received. Also, I would like to be able to limit network traffic (in & out) for my app. Something like the NetLimiter software (great app!) but which I can control from my code.

Do you know some third party components to do this ?

This is meant to be used on a datasnap 2009 thin-client.

3条回答
放我归山
2楼-- · 2019-05-28 10:17

If your are developing an application on unix-based box such as Linux, you can limit your connection speed using linux's built-in firewall name iptables.

查看更多
干净又极端
3楼-- · 2019-05-28 10:27

If you use Indy, then use the TIdInterceptThrottler class. Simply set the BitsPerSec property.

My understanding is that DataSnap is based on Indy.

查看更多
不美不萌又怎样
4楼-- · 2019-05-28 10:31

If you mean by the system as a whole (and not the application - it's a bit unclear), you could look at WinPCap. There are Delphi wrappers available.

查看更多
登录 后发表回答