Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
Arquivo: Form1.cs Projeto: minskowl/MY
 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"));
 }
Exemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     client.SendCommand(new Command(CommandType.Message, address, "sndhsdnjh"));
 }