protected virtual bool ParseCommand(ref byte[] data)
 {
     if (NextLength == -1)
     {
         DataBuffer = new byte[2];
         NextLength = 2;
     }
     for (; NextLength > 0 && CurStreamIndex < data.Length; CurStreamIndex++)
     {
         DataBuffer[2 - NextLength] = data[CurStreamIndex];
         NextLength--;
     }
     if (NextLength == 0)
     {
         NextLength  = -1;
         CommandType = (P2PCommandType)((DataBuffer[1] << 8) + DataBuffer[0]);
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public SendPacket(P2PCommandType commandType)
 {
     CommandType = commandType;
 }
 public CommandFlag(P2PCommandType commandType)
 {
     CommandType = commandType;
 }