Class PongHandler

java.lang.Object
crow.game.ha0.proto.PongHandler
All Implemented Interfaces:
PacketHandler<Pong>

public class PongHandler extends Object implements PacketHandler<Pong>
  • Constructor Details

    • PongHandler

      public PongHandler()
  • Method Details

    • fromPacket

      public Pong fromPacket(Context ctx, PacketReader buffer) throws Exception
      Description copied from interface: PacketHandler
      Convert the given buffer to the type.
      Specified by:
      fromPacket in interface PacketHandler<Pong>
      Parameters:
      ctx - The calling context.
      buffer - The input buffer stream reader.
      Returns:
      The POJO object
      Throws:
      Exception - on errors
    • toPacket

      public void toPacket(Context ctx, io.netty.buffer.ByteBuf buffer, Pong src) throws Exception
      Description copied from interface: PacketHandler
      Writes the object of type T to the byte buffer.
      Specified by:
      toPacket in interface PacketHandler<Pong>
      Parameters:
      ctx - The calling context.
      buffer - The destination buffer.
      src - The source object we are converting.
      Throws:
      Exception - on errors
    • rule

      public PacketRule rule(Context ctx)
      Specified by:
      rule in interface PacketHandler<Pong>
      Parameters:
      ctx - The calling context.
      Returns:
      The packet rule object which specifies when this packet handler should be called.
      See Also: