public class RpcPacket extends Object implements Recyclable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RpcPacket.RequestPacket
Rpc Request
|
static class |
RpcPacket.ResponsePacket
Rpc Response
|
| 限定符和类型 | 字段和说明 |
|---|---|
static byte |
ACK_NO |
static byte |
ACK_YES |
static byte |
TYPE_PING |
static byte |
TYPE_PONG |
static byte |
TYPE_REQUEST |
static byte |
TYPE_RESPONSE |
| 构造器和说明 |
|---|
RpcPacket(int packetType) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getAck() |
byte[] |
getData() |
long |
getPacketLength() |
int |
getPacketType() |
void |
recycle()
recycle
|
void |
setAck(byte ack) |
void |
setData(byte[] data) |
void |
setPacketLength(long packetLength) |
String |
toString() |
recyclepublic static final byte TYPE_REQUEST
public static final byte TYPE_RESPONSE
public static final byte TYPE_PING
public static final byte TYPE_PONG
public static final byte ACK_NO
public static final byte ACK_YES
public long getPacketLength()
public void setPacketLength(long packetLength)
public int getAck()
public void setAck(byte ack)
public int getPacketType()
public byte[] getData()
public void setData(byte[] data)
public void recycle()
Recyclablerecycle 在接口中 RecyclableCopyright © 2021. All rights reserved.