public class WebSocketFrame extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static byte |
FIN
1000 0000
|
static byte |
HAS_EXTEND_DATA |
static byte |
HAS_EXTEND_DATA_CONTINUE |
static byte |
MASK
1000 0000
|
static byte |
OPCODE
0000 1111
|
static byte |
PAYLOAD_LEN
0111 1111
|
static byte |
RSV1
0111 0000
|
static byte |
RSV2
0011 0000
|
static byte |
RSV3
0001 0000
|
| 构造器和说明 |
|---|
WebSocketFrame() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
computeCount(AutoByteBuffer buffer,
int count)
方法名:computeCount
|
long |
getDateLength()
方法名:getDateLength
@return
返回类型:long
说明:获取数据长度
|
byte |
getFin() |
byte |
getMask() |
byte[] |
getMaskingKey() |
byte |
getOpcode() |
byte[] |
getPayloadData() |
byte |
getPayloadLen() |
short |
getPayloadLenExtended() |
long |
getPayloadLenExtendedContinued() |
byte |
getRsv1() |
byte |
getRsv2() |
byte |
getRsv3() |
boolean |
isMask() |
boolean |
isReadFinish() |
void |
parseMessageHeader(AutoByteBuffer buffer)
解析消息头部信息
|
void |
setDateLength(long len)
方法名:setDateLength
|
void |
setFin(byte fin) |
void |
setMask(byte mask) |
void |
setMaskingKey(byte... maskingKey) |
void |
setOpcode(byte opcode) |
void |
setPayloadData(byte[] payloadData) |
void |
setPayloadLen(byte payloadLen) |
void |
setPayloadLenExtended(short payloadLenExtended) |
void |
setPayloadLenExtendedContinued(long payloadLenExtendedContinued) |
void |
setReadFinish(boolean readFinish) |
void |
setRsv1(byte rsv1) |
void |
setRsv2(byte rsv2) |
void |
setRsv3(byte rsv3) |
public static final byte FIN
public static final byte RSV1
public static final byte RSV2
public static final byte RSV3
public static final byte OPCODE
public static final byte MASK
public static final byte PAYLOAD_LEN
public static final byte HAS_EXTEND_DATA
public static final byte HAS_EXTEND_DATA_CONTINUE
public boolean isReadFinish()
public void setReadFinish(boolean readFinish)
public byte getFin()
public void setFin(byte fin)
public byte getMask()
public boolean isMask()
public void setMask(byte mask)
public byte[] getMaskingKey()
public void setMaskingKey(byte... maskingKey)
public byte getOpcode()
public void setOpcode(byte opcode)
public byte[] getPayloadData()
public void setPayloadData(byte[] payloadData)
public byte getPayloadLen()
public void setPayloadLen(byte payloadLen)
public short getPayloadLenExtended()
public void setPayloadLenExtended(short payloadLenExtended)
public long getPayloadLenExtendedContinued()
public void setPayloadLenExtendedContinued(long payloadLenExtendedContinued)
public byte getRsv1()
public void setRsv1(byte rsv1)
public byte getRsv2()
public void setRsv2(byte rsv2)
public byte getRsv3()
public void setRsv3(byte rsv3)
public long getDateLength()
public void setDateLength(long len)
len - 长度
设置数据长度public int computeCount(AutoByteBuffer buffer, int count)
buffer - count - public void parseMessageHeader(AutoByteBuffer buffer) throws Exception
buffer - 数据ExceptionCopyright © 2021. All rights reserved.