2

hobbyist/non-profession programmer here. I don't have a strong grasp on network addressing.

I have a computer that simultainiously connects to two different networks. 1 through wireless, one by network cable.

In my DotNet (c#) windows form app, I would like it to send some requests to one of the networks through one of the NICs, and other requests through the other one.

How would I specify/set (some dotNet object property?) which network/NIC the request flows through?

SteveH
  • 23
  • 2
  • 2
    Take a look here it's actually easy: http://stackoverflow.com/questions/436778/send-broadcast-message-from-all-network-adapters – Keith Adler Mar 19 '10 at 18:17

1 Answers1

0

Use Socket.Bind() before connecting to specify a particular local endpoint before establishing the connection. Depending on which of the 2 local ips you have you bind it should go through one interface or the other.

MK.
  • 33,605
  • 18
  • 74
  • 111