Search code examples
c#portsremote-connection

Connecting to a remote host syntax


In c# when I use the code :

 public System.IAsyncResult BeginConnect(System.Net.EndPoint remoteEP, System.AsyncCallback callback, object state)

I declare the EndPoint with the ip-address of the remote host am communicating with and a port number. In this case the port number represents a port on my system or on the remote host??


Solution

  • You connect to a remote endpoint so the port is the port on remote machine.