Hello, Nattydreadlock!
N> I have a little problem here.
N> I have a server which has multiple IP addresses. I'm writing a program
N> which connects to a webservice but at run-time I need to decide which
N> IP to use. Does anyone has an idea about how you can programmatically
N> set your IP-address in .NET , c# or VB
before calling connect you have to bind your socket to specific IP address.
The sample is like this
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
s.Bind(new IPEndPoint(ipAddress, somePort));
s.Connect("somewhere", someOtherPort);
The connection will be established from ipAddress address and somePort port
--
Regards, Vadym Stetsyak
www:
http://vadmyst.blogspot.com