Examples of UnknownPacketException


Examples of com.flowpowered.networking.exception.UnknownPacketException

            buf.markReaderIndex();

            opcode = ByteBufUtils.readVarInt(buf);
            return inboundCodecs.find(opcode);
        } catch (IOException e) {
            throw new UnknownPacketException("Failed to read packet data (corrupt?)", opcode, length);
        } catch (IllegalOpcodeException e) {
            // go back to before opcode, so that skipping length doesn't skip too much
            buf.resetReaderIndex();
            throw new UnknownPacketException("Opcode received is not a registered codec on the server!", opcode, length);
        }
    }
View Full Code Here

Examples of com.zylin.zpu.simulator.exceptions.UnknownPacketException

        */
          server.alive=false;
          reply("OK");
      } else
      {
        throw new UnknownPacketException();
      }
    } catch (UnknownPacketException e)
    {
      this.server.print(GDBServer.UNKNOWN, "Unknown packet: " + origCmd);
      // empty reply to unknown packets
View Full Code Here

Examples of org.spout.api.exception.UnknownPacketException

  @Override
  public MessageCodec<?> readHeader(ByteBuf buf) throws UnknownPacketException {
    int opcode = buf.readUnsignedByte();
    MessageCodec<?> codec = getCodecLookupService().find(opcode);
    if (codec == null) {
      throw new UnknownPacketException(opcode);
    }
    return codec;
  }
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.