Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I embed NetLimiter in my application

Tags:

winapi

qos

I have a C# client application that connects to multiple servers. I noticed that it is necessary to use NetLimiter activated rules in order to make my client connect correctly with higher priority when there is so many traffic on the client computer.

I did not find any documents about how can I embed and make rules programmatically in this application. However, I read here that someone tried to use Netlimiter API but failed.

I read somewhere that I can write my own application that uses TC API of the Windows in here and mark DSCP to make priorities. But I reached to this problem before setting flow options of my C# application.

Please guide me with this issue.

like image 396
Matin Lotfaliee Avatar asked May 13 '17 06:05

Matin Lotfaliee


1 Answers

Look here. Connect() and SetRule() are the only APIs available.

NetLimiter seems to be a COM object, so to use it from C# you need something like this:

dynamic myownlimiter = Activator.CreateInstance(Type.GetTypeFromProgID("NetLimiter.VirtualClient"));
myownlimiter.Connect("host", "port");

and then use SetRule() as described in the first link.

like image 68
hidefromkgb Avatar answered Dec 22 '22 01:12

hidefromkgb