Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Is there any way to configure a server to listen to a specific IP using TCP client in Socket Class.
i have the following code

TcpClient client = new TcpClient(ClientIpEndpoint.Address.ToString(), ClientIpEndpoint.Port);
NetworkStream ClientStream = client.GetStream();

if ClientIpEndpoint is IpAdree.Any it is working fine . if a give a specfic ip it is throwing error "The requested address is not valid in its context"
Richard MacCutchan 14-Feb-15 4:20am    
Check the address that you are trying to use, to see why it is invalid.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900