public void SendHostInfo() { // Establish the remote endpoint for the socket. IPEndPoint remoteEP = new IPEndPoint(remoteIP, port); // Create a TCP/IP socket. Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); // Connect to the remote endpoint. client.BeginConnect(remoteEP, new AsyncCallback(ConnectCallback), client); connectDone.WaitOne(); // Send test data to the remote device. string hostInfo = new Settings().LocalMachine.Serialize(); Send(client, hostInfo+"<EOF>"); sendDone.WaitOne(); // Release the socket. client.Shutdown(SocketShutdown.Both); client.Close(); }
public UDPListener() { var settings = new Remoft.Common.Settings(); listenPort = settings.UdpPort; }
public AsynchronousClient(IPAddress remoteIP) { var settings = new Settings(); port = settings.TcpPort; this.remoteIP = remoteIP; }