Package crow.game.login.proto
Class LoginSuccessHandlerBase
java.lang.Object
crow.game.login.proto.LoginSuccessHandlerBase
- All Implemented Interfaces:
PacketHandler<LoginSuccess>
- Direct Known Subclasses:
LoginSuccessHandler2016,LoginSuccessHandler20170315
Base class for abstracting common login success logic, as it's a packet with multiple packet
prefixes but that share similar layouts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromPacket(Context ctx, PacketReader buffer) Convert the given buffer to the type.voidtoPacket(Context ctx, io.netty.buffer.ByteBuf buf, LoginSuccess src) Writes the object of type T to the byte buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface crow.game.codec.PacketHandler
rule
-
Constructor Details
-
LoginSuccessHandlerBase
public LoginSuccessHandlerBase()
-
-
Method Details
-
fromPacket
Description copied from interface:PacketHandlerConvert the given buffer to the type.- Specified by:
fromPacketin interfacePacketHandler<LoginSuccess>- Parameters:
ctx- The calling context.buffer- The input buffer stream reader.- Returns:
- The POJO object
- Throws:
Exception- on errors
-
toPacket
Description copied from interface:PacketHandlerWrites the object of type T to the byte buffer.- Specified by:
toPacketin interfacePacketHandler<LoginSuccess>- Parameters:
ctx- The calling context.buf- The destination buffer.src- The source object we are converting.- Throws:
Exception- on errors
-