BodyType - The body type of this message.public class ClientMsgProtobuf<BodyType extends com.google.protobuf.GeneratedMessageV3.Builder<BodyType>> extends AClientMsgProtobuf
payload| Constructor and Description |
|---|
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg)
Initializes a new instance of the
ClientMsgProtobuf class. |
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
int payloadReserve)
Initializes a new instance of the
ClientMsgProtobuf class. |
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
MsgBase<MsgHdrProtoBuf> msg)
Initializes a new instance of the
ClientMsgProtobuf class. |
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
MsgBase<MsgHdrProtoBuf> msg,
int payloadReserve)
Initializes a new instance of the
ClientMsgProtobuf class. |
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
IPacketMsg msg)
Initializes a new instance of the
ClientMsgProtobuf class. |
ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
IPacketMsg msg,
int payloadReserve)
Initializes a new instance of the
ClientMsgProtobuf class. |
| Modifier and Type | Method and Description |
|---|---|
void |
deserialize(byte[] data)
Initializes this client message by deserializing the specified data.
|
BodyType |
getBody() |
byte[] |
serialize()
serializes this client message instance to a byte array.
|
getMsgType, getProtoHeader, getSessionID, getSourceJobID, getSteamID, getTargetJobID, isProto, setSessionID, setSourceJobID, setSteamID, setTargetJobIDgetPayload, readByte, readBytes, readDouble, readFloat, readInt, readLong, readNullTermString, readNullTermString, readShort, seek, write, write, write, write, write, write, write, write, write, writeNullTermString, writeNullTermStringpublic ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
IPacketMsg msg)
ClientMsgProtobuf class.
This is a client send constructor.clazz - the type of the bodymsg - The network message type this client message represents.public ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
IPacketMsg msg,
int payloadReserve)
ClientMsgProtobuf class.
This is a client send constructor.clazz - the type of the bodymsg - The network message type this client message represents.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg)
ClientMsgProtobuf class.
This is a client send constructor.clazz - the type of the bodyeMsg - The network message type this client message represents.public ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
int payloadReserve)
ClientMsgProtobuf class.
This is a client send constructor.clazz - the type of the bodyeMsg - The network message type this client message represents.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
MsgBase<MsgHdrProtoBuf> msg)
ClientMsgProtobuf class.
This is a reply constructor.clazz - the type of the bodyeMsg - The network message type this client message represents.msg - The message that this instance is a reply for.public ClientMsgProtobuf(java.lang.Class<? extends com.google.protobuf.AbstractMessage> clazz,
EMsg eMsg,
MsgBase<MsgHdrProtoBuf> msg,
int payloadReserve)
ClientMsgProtobuf class.
This is a reply constructor.clazz - the type of the bodyeMsg - The network message type this client message represents.msg - The message that this instance is a reply for.payloadReserve - The number of bytes to initialize the payload capacity to.public BodyType getBody()
public byte[] serialize()
IClientMsgserialize in interface IClientMsgserialize in class AClientMsgProtobufpublic void deserialize(byte[] data)
IClientMsgdeserialize in interface IClientMsgdeserialize in class AClientMsgProtobufdata - The data representing a client message.