P
Prigozhin Roman
I have 2 network cards in the machine and I'm running C# programm which connects to the
remote FTP server via socket here is the code :
clientSocket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
IPEndPoint ep = new IPEndPoint(Dns.Resolve(remoteHost).AddressList[0], remotePort);
try
{
clientSocket.Connect(ep);
}
catch(Exception)
{
throw new IOException("Couldn't connect to remote server");
}
The problem is that I want my connection to go trhough specific card. Because if it( program ) picks the card
it self it goes through other sub network and slows down the connection.
Is there any whay to specify source ip of the packet I'm sending. In other words bind the socket to the specific
IP ( one of the two network cards I have )
Thanks
Roman
remote FTP server via socket here is the code :
clientSocket = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
IPEndPoint ep = new IPEndPoint(Dns.Resolve(remoteHost).AddressList[0], remotePort);
try
{
clientSocket.Connect(ep);
}
catch(Exception)
{
throw new IOException("Couldn't connect to remote server");
}
The problem is that I want my connection to go trhough specific card. Because if it( program ) picks the card
it self it goes through other sub network and slows down the connection.
Is there any whay to specify source ip of the packet I'm sending. In other words bind the socket to the specific
IP ( one of the two network cards I have )
Thanks
Roman