class io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler extends io.netty.channel.ChannelInboundHandlerAdapter
{
private final io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig;
private io.netty.channel.ChannelHandlerContext ctx;
private io.netty.channel.ChannelPromise handshakePromise;
private boolean isWebSocketPath;
void <init>(io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig)
{
java.lang.Object v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v := @parameter: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig;
specialinvoke v.<io.netty.channel.ChannelInboundHandlerAdapter: void <init>()>();
v = staticinvoke <io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "serverConfig");
v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig> = v;
return;
}
public void handlerAdded(io.netty.channel.ChannelHandlerContext)
{
io.netty.channel.ChannelHandlerContext v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
io.netty.channel.ChannelPromise v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.channel.ChannelHandlerContext ctx> = v;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPromise newPromise()>();
v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.channel.ChannelPromise handshakePromise> = v;
return;
}
public void channelRead(io.netty.channel.ChannelHandlerContext, java.lang.Object) throws java.lang.Exception
{
java.lang.Throwable v;
io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory v;
io.netty.handler.codec.http.HttpObject v;
io.netty.channel.ChannelHandlerContext v;
io.netty.channel.ChannelPromise v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1 v;
java.lang.String v, v, v;
boolean v, v, v, v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig v;
io.netty.channel.ChannelPipeline v, v;
io.netty.channel.ChannelFuture v;
io.netty.channel.Channel v, v, v;
io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker v;
java.lang.Object v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig v, v, v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Object;
v = v instanceof io.netty.handler.codec.http.HttpRequest;
if v == 0 goto label;
v = specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: boolean isWebSocketPath(io.netty.handler.codec.http.HttpRequest)>(v);
v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: boolean isWebSocketPath> = v;
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: boolean isWebSocketPath>;
if v != 0 goto label;
interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelHandlerContext fireChannelRead(java.lang.Object)>(v);
return;
label:
v = new io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPipeline pipeline()>();
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: java.lang.String websocketPath()>();
v = staticinvoke <io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: java.lang.String getWebSocketLocation(io.netty.channel.ChannelPipeline,io.netty.handler.codec.http.HttpRequest,java.lang.String)>(v, v, v);
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: java.lang.String subprotocols()>();
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig decoderConfig()>();
specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory: void <init>(java.lang.String,java.lang.String,io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig)>(v, v, v);
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory: io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker newHandshaker(io.netty.handler.codec.http.HttpRequest)>(v);
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.channel.ChannelPromise handshakePromise>;
if v != null goto label;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.Channel channel()>();
staticinvoke <io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory: io.netty.channel.ChannelFuture sendUnsupportedVersionResponse(io.netty.channel.Channel)>(v);
goto label;
label:
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.Channel channel()>();
staticinvoke <io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler: void setHandshaker(io.netty.channel.Channel,io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker)>(v, v);
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelPipeline pipeline()>();
interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelPipeline remove(io.netty.channel.ChannelHandler)>(v);
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.Channel channel()>();
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker: io.netty.channel.ChannelFuture handshake(io.netty.channel.Channel,io.netty.handler.codec.http.HttpRequest)>(v, v);
v = new io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1;
specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$1: void <init>(io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler,io.netty.channel.ChannelPromise,io.netty.channel.ChannelHandlerContext,io.netty.handler.codec.http.HttpRequest,io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker)>(v, v, v, v, v);
interfaceinvoke v.<io.netty.channel.ChannelFuture: io.netty.channel.ChannelFuture addListener(io.netty.util.concurrent.GenericFutureListener)>(v);
specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: void applyHandshakeTimeout()>();
label:
staticinvoke <io.netty.util.ReferenceCountUtil: boolean release(java.lang.Object)>(v);
goto label;
label:
v := @caughtexception;
staticinvoke <io.netty.util.ReferenceCountUtil: boolean release(java.lang.Object)>(v);
throw v;
label:
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: boolean isWebSocketPath>;
if v != 0 goto label;
interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelHandlerContext fireChannelRead(java.lang.Object)>(v);
goto label;
label:
staticinvoke <io.netty.util.ReferenceCountUtil: boolean release(java.lang.Object)>(v);
label:
return;
catch java.lang.Throwable from label to label with label;
}
private boolean isWebSocketPath(io.netty.handler.codec.http.HttpRequest)
{
io.netty.handler.codec.http.HttpRequest v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
java.lang.String v, v, v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig v, v;
boolean v, v, v, v, v, v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v := @parameter: io.netty.handler.codec.http.HttpRequest;
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: java.lang.String websocketPath()>();
v = interfaceinvoke v.<io.netty.handler.codec.http.HttpRequest: java.lang.String uri()>();
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>(v);
v = "/";
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v != 0 goto label;
v = specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: boolean checkNextUri(java.lang.String,java.lang.String)>(v, v);
if v == 0 goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: boolean checkStartsWith()>();
if v == 0 goto label;
if v == 0 goto label;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
goto label;
label:
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
label:
return v;
}
private boolean checkNextUri(java.lang.String, java.lang.String)
{
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
int v, v;
char v;
java.lang.String v, v;
boolean v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v := @parameter: java.lang.String;
v := @parameter: java.lang.String;
v = virtualinvoke v.<java.lang.String: int length()>();
v = virtualinvoke v.<java.lang.String: int length()>();
if v <= v goto label;
v = virtualinvoke v.<java.lang.String: char charAt(int)>(v);
if v == 47 goto label;
if v != 63 goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
return v;
label:
return 1;
}
private static void sendHttpResponse(io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.http.HttpRequest, io.netty.handler.codec.http.HttpResponse)
{
io.netty.handler.codec.http.HttpRequest v;
io.netty.handler.codec.http.HttpResponseStatus v;
io.netty.channel.ChannelFuture v;
io.netty.channel.ChannelHandlerContext v;
io.netty.channel.ChannelFutureListener v;
int v;
io.netty.handler.codec.http.HttpResponse v;
boolean v;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: io.netty.handler.codec.http.HttpRequest;
v := @parameter: io.netty.handler.codec.http.HttpResponse;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelFuture writeAndFlush(java.lang.Object)>(v);
v = staticinvoke <io.netty.handler.codec.http.HttpUtil: boolean isKeepAlive(io.netty.handler.codec.http.HttpMessage)>(v);
if v == 0 goto label;
v = interfaceinvoke v.<io.netty.handler.codec.http.HttpResponse: io.netty.handler.codec.http.HttpResponseStatus status()>();
v = virtualinvoke v.<io.netty.handler.codec.http.HttpResponseStatus: int code()>();
if v == 200 goto label;
label:
v = <io.netty.channel.ChannelFutureListener: io.netty.channel.ChannelFutureListener CLOSE>;
interfaceinvoke v.<io.netty.channel.ChannelFuture: io.netty.channel.ChannelFuture addListener(io.netty.util.concurrent.GenericFutureListener)>(v);
label:
return;
}
private static java.lang.String getWebSocketLocation(io.netty.channel.ChannelPipeline, io.netty.handler.codec.http.HttpRequest, java.lang.String)
{
io.netty.handler.codec.http.HttpHeaders v;
io.netty.handler.codec.http.HttpRequest v;
io.netty.util.AsciiString v;
io.netty.channel.ChannelPipeline v;
io.netty.channel.ChannelHandler v;
java.lang.String v, v, v, v;
v := @parameter: io.netty.channel.ChannelPipeline;
v := @parameter: io.netty.handler.codec.http.HttpRequest;
v := @parameter: java.lang.String;
v = "ws";
v = interfaceinvoke v.<io.netty.channel.ChannelPipeline: io.netty.channel.ChannelHandler get(java.lang.Class)>(class "Lio/netty/handler/ssl/SslHandler;");
if v == null goto label;
v = "wss";
label:
v = interfaceinvoke v.<io.netty.handler.codec.http.HttpRequest: io.netty.handler.codec.http.HttpHeaders headers()>();
v = <io.netty.handler.codec.http.HttpHeaderNames: io.netty.util.AsciiString HOST>;
v = virtualinvoke v.<io.netty.handler.codec.http.HttpHeaders: java.lang.String get(java.lang.CharSequence)>(v);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String,java.lang.String)>(v, v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u0001://\u0001\u0001");
return v;
}
private void applyHandshakeTimeout()
{
io.netty.util.concurrent.EventExecutor v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler v;
io.netty.util.concurrent.ScheduledFuture v;
long v;
java.util.concurrent.TimeUnit v;
io.netty.channel.ChannelHandlerContext v;
byte v;
io.netty.channel.ChannelPromise v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$3 v;
boolean v;
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$2 v;
v := @this: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler;
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.channel.ChannelPromise handshakePromise>;
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig serverConfig>;
v = virtualinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig: long handshakeTimeoutMillis()>();
v = v cmp 0L;
if v <= 0 goto label;
v = interfaceinvoke v.<io.netty.channel.ChannelPromise: boolean isDone()>();
if v == 0 goto label;
label:
return;
label:
v = v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler: io.netty.channel.ChannelHandlerContext ctx>;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.util.concurrent.EventExecutor executor()>();
v = new io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$2;
specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$2: void <init>(io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler,io.netty.channel.ChannelPromise)>(v, v);
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = interfaceinvoke v.<io.netty.util.concurrent.EventExecutor: io.netty.util.concurrent.ScheduledFuture schedule(java.lang.Runnable,long,java.util.concurrent.TimeUnit)>(v, v, v);
v = new io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$3;
specialinvoke v.<io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler$3: void <init>(io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandshakeHandler,io.netty.util.concurrent.Future)>(v, v);
interfaceinvoke v.<io.netty.channel.ChannelPromise: io.netty.channel.ChannelPromise addListener(io.netty.util.concurrent.GenericFutureListener)>(v);
return;
}
}