public static ChannelFuture sendUnsupportedVersionResponse ( Channel channel , ChannelPromise promise ) { HttpResponse res = new DefaultFullHttpResponse ( HttpVersion . HTTP_1_1 , HttpResponseStatus . UPGRADE_REQUIRED ) ; res . headers ( ) . set ( HttpHeaderNames . SEC_WEBSOCKET_VERSION , WebSocketVersion . V13 . toHttpHeaderValue ( ) ) ; HttpUtil . setContentLength ( res , 0 ) ; return channel . writeAndFlush ( res , promise ) ; }
Return that we need cannot not support the web socket version