public void OnConnect(Object sender, EventArgs e) { this.proc = new TCPRemoteCommandProcessor("127.0.0.1", TCP_PORT, true); string result = null; this.proc.Execute(this.name.Text + ":HELLO", ref result); this.connected = result.Equals("HELLO"); EnableControls(); }
public static void Main() { Console.WriteLine("initializing client..."); TCPRemoteCommandProcessor proc = new TCPRemoteCommandProcessor("127.0.0.1", 8080, false); string result = null; Console.WriteLine("requesting..."); proc.Execute("GET", ref result); Console.WriteLine("result: " + result); Console.WriteLine("closing connection..."); proc.Execute("EXIT", ref result); proc.Close(); Console.Write("press return to exit"); Console.ReadLine(); }