public class WebSocketTools extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
byteToInt(byte[] bRefArr)
byte 转换成 int
|
static String |
generateSecKey(String in)
生成协议升级的 KEY
|
static byte[] |
intToByteArray(int iSource,
int iArrayLen)
将 int 转换成 byte[]
|
static boolean |
isWebSocketUpgrade(Request request)
s是否是 websocket 升级协议
|
public static boolean isWebSocketUpgrade(Request request)
request - Http 请求对象public static String generateSecKey(String in)
in - 协议参数public static byte[] intToByteArray(int iSource,
int iArrayLen)
iSource - int 值iArrayLen - 数组长度public static int byteToInt(byte[] bRefArr)
bRefArr - byte 数组Copyright © 2020 Voovan. All rights reserved.