public static EmbeddedChannel webSocketChannel(final SockJsConfig config) {
return new EmbeddedChannel(
new HttpServerCodec(),
new CorsInboundHandler(),
new CorsOutboundHandler(),
new WebSocket13FrameEncoder(true),
new WebSocket13FrameDecoder(true, false, 2048),
new WebSocketTransport(config),
new SockJsHandler());
}