Exemplo n.º 1
0
 /// <summary>
 /// Start the reader.
 /// </summary>
 public void Run(Rcon rcon)
 {
     while (Running)
     {
         Int32 size = readSize();
         Int32 id = readId();
         Int32 type = readType();
         string body = readEnd();
         if (id == 1) // Ignore all packages with ID 1 (buffer duplicate)
             continue;
         rcon.UpdatePackage(new Package(id, type, body));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Start the reader.
 /// </summary>
 public void Run(Rcon rcon)
 {
     while (Running)
     {
         Int32  size = readSize();
         Int32  id   = readId();
         Int32  type = readType();
         string body = readEnd();
         if (id == 1) // Ignore all packages with ID 1 (buffer duplicate)
         {
             continue;
         }
         rcon.UpdatePackage(new Package(id, type, body));
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Start the reader.
 /// </summary>
 public void Run(Rcon rcon)
 {
     while (Running)
     {
         try
         {
             Int32  size = readSize();
             Int32  id   = readId();
             Int32  type = readType();
             string body = readEnd(size - 8);
             if (id == 1) // Ignore all packages with ID 1 (buffer duplicate)
             {
                 continue;
             }
             rcon.UpdatePackage(new Package(id, type, body));
         }
         catch (IllegalProtocolException e)
         {
             // Ignore
         }
     }
 }