Package net.bnubot.util

Examples of net.bnubot.util.BNetInputStream.readByte()


    int cookie_out = c.getConnectionSettings().botNum;
    BNetInputStream is = bnls.sendWarden1(cookie_out, payload);

    byte u = is.readByte();
    int cookie = is.readDWord();
    byte result = is.readByte();
    short dataLen = is.readWord();
    byte[] data = new byte[dataLen];
    is.read(data);

    if(u != 1)
View Full Code Here


           * 0x01 - (A) Failed
           * 0x02 - (C) Account created
           * 0x03 - (A) Account online.
           * Other: Unknown (failure).
           */
          int status = is.readByte();
          switch(status) {
          case 0x00:
            dispatchRecieveInfo("Login accepted.");
            break;
          case 0x01:
View Full Code Here

           * 0x01 : Operator
           * 0x02 : Ignored
           * 0x04 : Admin
           * 0x08 : NetOp
           */
          int numUsers = is.readByte();
          for(int i = 0; i < numUsers; i++) {
            String username = is.readNTString();
            int flags = is.readDWord();

            dispatchChannelUser(findCreateBNUser(username, flags));
View Full Code Here

           * 0x02 : Whisper To
           * 0x03 : Whisper From
           * 0x04 : Emote
           * 0x05 : Self Emote
           */
          int chatType = is.readByte();
          String username = is.readNTString();
          ByteArray text = new ByteArray(is.readNTBytes());

          // Get a BNetUser object for the user
          BNetUser user = null;
View Full Code Here

    // Operates on a socket, which we don't want to close; suppress the warning
    @SuppressWarnings("resource")
    BNetInputStream is = new BNetInputStream(rawis);

    packetLength = is.readWord() & 0x0000FFFF;
    packetId = BNLSPacketId.values()[is.readByte() & 0x000000FF];
    assert(packetLength >= 3);

    data = new byte[packetLength-3];
    for(int i = 0; i < packetLength-3; i++)
      data[i] = is.readByte();
View Full Code Here

    packetId = BNLSPacketId.values()[is.readByte() & 0x000000FF];
    assert(packetLength >= 3);

    data = new byte[packetLength-3];
    for(int i = 0; i < packetLength-3; i++)
      data[i] = is.readByte();

    if(GlobalSettings.packetLog) {
      String msg = "RECV " + packetId.name();
      if(Out.isDebug()) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.