applyProtocol
public boolean applyProtocol(io.netty.buffer.ByteBuf buffer,
io.netty.channel.ChannelPipeline pipeline)
Apply a protocol on the pipeline to handle login. Implementations will
first "search" if the incoming bytes correspond to the implementations
protocol, only if they match, the correspoinding protocol will be
applied.
- Specified by:
applyProtocol in interface LoginProtocol
- Parameters:
buffer - The incoming buffer, by default around 5 bytes will be read
and passed on to detect the protocolpipeline - The channelpipeline on which the login protocol handlers need
to be set.
- Returns:
- Returs true if the protocol was applied, else false.