Example #1
0
 public void sendToAll(CommandClient command)
 {
     lock (connections)
     {
         for (int i = 0; i < connections.Count; i++)
         {
             send(connections[i].Socket, command);
         }
     }
 }
Example #2
0
 void send(Socket s, CommandClient command)
 {
     MemoryStream x = new MemoryStream();
     binFormat.Serialize(x, command);
     s.Send(x.GetBuffer());
 }