private void ClientConnected(object sender, ClientEventArgs clientEventArgs) { var slave = new Slave(clientEventArgs.Client); Trace.WriteLine( String.Format("[{0}] Connected :D", slave.Client.RemoteEndPoint), "Commander.ClientConnected()"); slave.Client.PacketReceived += PacketReceived; slave.Client.PacketSent += PacketSent; _slaves.Add(slave.Client.ClientHandle, slave); slave.Client.SendPacket(new RequestInfoPacket()); SlaveConnected(this, new SlaveEventArgs(slave)); clientEventArgs.Client.ReceivePacketAsync(); }
public SlaveEventArgs(Slave slave) { Slave = slave; }