public void handleReceive(IByteBuffer byteBuf, Ukcp ukcp) { var message = _protoDecodeEncode.decode(byteBuf); var handler = _messageManager.getHandler(message.MessageId); handler.handler(message); }
protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List <object> output) { if (!input.IsReadable()) { return; } var message = _protoDecodeEncode.decode(input); output.Add(message); }