Skip to content

Instantly share code, notes, and snippets.

@yongboy
Last active August 29, 2015 14:01
Show Gist options
  • Save yongboy/2554f97c8633ecd4050c to your computer and use it in GitHub Desktop.
Save yongboy/2554f97c8633ecd4050c to your computer and use it in GitHub Desktop.
public class MqttMessageWebSocketFrameDecoder extends
MessageToMessageDecoder<BinaryWebSocketFrame> {
private MqttMessageNewDecoder messageNewDecoder;
public MqttMessageWebSocketFrameDecoder() {
messageNewDecoder = new MqttMessageNewDecoder();
}
@Override
protected void decode(ChannelHandlerContext ctx,
BinaryWebSocketFrame wsFrame, List<Object> out) throws Exception {
ByteBuf buf = wsFrame.content();
this.messageNewDecoder.decode(ctx, buf, out);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment