public abstract class WebSocketSupportUtil extends Object
| 限定符 | 构造器和说明 |
|---|---|
private |
WebSocketSupportUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static io.netty.handler.codec.http.HttpRequest |
convertParameter(io.netty.handler.codec.http.HttpRequest req)
Put websocket's parameter into header for token authentication.
|
static boolean |
createWSClient(HttpRequestWrapper req,
ChannelHandlerContext ctx,
HostResolver hostResolver,
EventLoopGroup eventLoopGroup,
io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker handshaker,
HttpProtocolWebSocketOption httpProtocolWebSocketOption)
Create client for connect remote websocket.
|
private static String |
hostToString(InetSocketAddress address) |
static boolean |
isWSProtocol(io.netty.handler.codec.http.HttpRequest req) |
private static void |
replaceProxyHostForRemoteConnenct(io.netty.handler.codec.http.HttpRequest httpRequest,
String host) |
public static boolean isWSProtocol(io.netty.handler.codec.http.HttpRequest req)
public static io.netty.handler.codec.http.HttpRequest convertParameter(io.netty.handler.codec.http.HttpRequest req)
req - original requestpublic static boolean createWSClient(HttpRequestWrapper req, ChannelHandlerContext ctx, HostResolver hostResolver, EventLoopGroup eventLoopGroup, io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker handshaker, HttpProtocolWebSocketOption httpProtocolWebSocketOption)
req - requestctx - handler contdexthostResolver - host resolvereventLoopGroup - thread poolhandshaker - hand shakerhttpProtocolWebSocketOption - WebSocket optionsprivate static void replaceProxyHostForRemoteConnenct(io.netty.handler.codec.http.HttpRequest httpRequest,
String host)
private static String hostToString(InetSocketAddress address)
Copyright © 2022 Zodiac. All rights reserved.