static void f_Connected(object sender, EasyTCP.TCP.Events.ClientArgs e) { //received connection. p.Add(e.Client); e.Client.Received += Client_Received; e.Client.Disconnected += Client_Disconnected; //send data to it. e.Client.Send(Encoding.ASCII.GetBytes("Data for Client.")); }
static void Client_Disconnected(object sender, EasyTCP.TCP.Events.ClientArgs e) { Console.WriteLine("Client Disconnected from Server."); }
static void x_Connected(object sender, EasyTCP.TCP.Events.ClientArgs e) { Console.WriteLine("Client Connected To Server."); }