public Form1() { InitializeComponent(); address = IPAddress.Parse("127.0.0.1"); client = new CommandClient(address, 8000, "Hi"); client.ConnectToServer(); client.CommandSent += new CommandSentEventHandler(client_CommandSent); client.CommandReceived += new CommandReceivedEventHandler(client_CommandReceived); client.SendCommand(new Command(CommandType.FreeCommand, IPAddress.Broadcast, client.IP + ":" + client.NetworkName)); client.SendCommand(new Command(CommandType.SendClientList, client.ServerIP)); }
private void button1_Click_1(object sender, EventArgs e) { client.SendCommand(new Command(CommandType.FreeCommand, IPAddress.Broadcast, client.IP + ":" + client.NetworkName)); client.SendCommand(new Command(CommandType.Message, address, "sndhsdnjh")); }
private void button1_Click(object sender, EventArgs e) { client.SendCommand(new Command(CommandType.Message, address, "sndhsdnjh")); }