I use mono to compile and run my C# console application. In that application i do several Http requests. Now i am in trouble with selecting proper network interface for app instance to send requests from.
Let's say i have eth0
and eth1
interfaces in my system. I need to force my application to use both of them in different instances. For example, when it starts first time, app chooses to use eth0
and writes its number to cache.txt
. If it starts again, it chooses second interface because cache.txt
says that first interface is used by another instance.
Question: In C# application for mono runtime, how can enumerate and specify (at app startup) a network interface to be used for all TCP/Http/udp requests during this instance?