Since IPEndpoint
contains a ToString()
method that outputs:
10.10.10.10:1010
There should also be
It looks like there is already a built in Parse method that handles ip4 and ip6 addresses http://msdn.microsoft.com/en-us/library/system.net.ipaddress.parse%28v=vs.110%29.aspx
// serverIP can be in ip4 or ip6 format
string serverIP = "192.168.0.1";
int port = 8000;
IPEndPoint remoteEP = new IPEndPoint(IPAddress.Parse(serverIP), port);