code: @Override
  	protected final void initChannel(Channel ch) throws Exception {
  		ChannelPipeline pipeline=ch.pipeline();
  		if (sslCtx != null) {
  			pipeline.addLast(sslCtx.newHandler(ch.alloc(),host,port));
          }
  		pipeline.addLast(new HttpClientCodec());
  		pipeline.addLast(new ChunkedWriteHandler());
  		pipeline.addLast(new HttpObjectAggregator(64*1024));
  		pipeline.addLast(new WebSocketClientProtocolHandler(WebSocketClientHandshakerFactory.newHandshaker(webSocketURL, WebSocketVersion.V13, subprotocol, false, new DefaultHttpHeaders())));
          pipeline.addLast(new WebSocketConnectedClientHandler());//连接成功监听handler
  	}
docs: 通道注册的时候配置websocket解码handler