Package soc.qase.com.packet

Examples of soc.qase.com.packet.ServerPacket


      int dataIndex = 0;

      while(dataIndex != incomingData.length)
      {
        ServerPacket packet = new ServerPacket(incomingData, dataIndex);
        processServerPacket(packet);

        dataIndex += packet.getLength();
      }
    }
    catch(IOException ioe)
    {
      return false;
View Full Code Here


    {
      int dataIndex = 8;

      while(dataIndex != incomingData.length)
      {
        ServerPacket sPacket = new ServerPacket(incomingData, dataIndex);
        Message msg = sPacket.getMessage();

        if(msg instanceof ServerStuffText)
        {
          String text = Utils.stringValue(incomingData, dataIndex + 1, Utils.stringLength(incomingData, dataIndex + 1));

          if(text.indexOf("precache") != -1)
            curData = new byte[]{11, 'p', 'r', 'e', 'c', 'a', 'c', 'h', 'e', '\n', '\0'};
          else if(text.indexOf("cmd configstring") != -1 || text.indexOf("cmd baseline") != -1 || text.indexOf("record") != -1)
            curData = null;
          else
            curData = Utils.extractBytes(incomingData, dataIndex, sPacket.getLength());
        }
        else if(msg instanceof ServerData)
        {
          curData = Utils.extractBytes(incomingData, dataIndex, sPacket.getLength());
          Utils.intToByteArray(65578, curData, 5);
          curData[9] = 1;
        }
        else if(msg instanceof ServerReconnect || msg instanceof ServerDownload)
          curData = null;
        else
          curData = Utils.extractBytes(incomingData, dataIndex, sPacket.getLength());

        if(curData != null)
          result = Utils.concatBytes(result, curData);

        dataIndex += sPacket.getLength();
      }
    }

    return result;
  }
View Full Code Here

      {
        int dataIndex = 8;

        while(dataIndex != incomingData.length)
        {
          packet = new ServerPacket(incomingData, dataIndex);
          processServerPacket((ServerPacket)packet);

          dataIndex += packet.getLength();
        }
      }
View Full Code Here

TOP

Related Classes of soc.qase.com.packet.ServerPacket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.