Exemple #1
0
 public void CommandListener()
 {
     while (true)
     {
         if (LockReadLine)
         {
             continue;
         }
         Console.Write("> ");
         string cmd = Console.ReadLine();
         if (!string.IsNullOrEmpty(cmd))
         {
             Handler.Client.Send(BytesCompress.CompressPacket(BytesTransformation.TransformIt(cmd), "CPacket"));
             LockReadLine = true;
         }
         Thread.Sleep(50);
     }
 }
Exemple #2
0
 public void SendMessage(OClient msgType, string msg, Socket client) => Handler.Server.Send(client, BytesCompress.CompressPacket(BytesTransformation.TransformIt((int)msgType, msg), "OPacket"));