T - The body type of this message.public final class ClientMsg<T extends ISteamSerializableMessage> extends MsgBase<ExtendedClientMsgHdr>
| Modifier and Type | Field and Description |
|---|---|
private T |
body
Gets the body structure of this message.
|
header, sessionID, sourceJobID, steamID, targetJobID| Constructor and Description |
|---|
ClientMsg(Class<T> clazz) |
ClientMsg(Class<T> clazz,
int payloadReserve)
Initializes a new instance of the
ClientMsg class. |
ClientMsg(Class<T> clazz,
MsgBase<ExtendedClientMsgHdr> msg) |
ClientMsg(Class<T> clazz,
MsgBase<ExtendedClientMsgHdr> msg,
int payloadReserve)
Initializes a new instance of the
ClientMsg class. |
ClientMsg(IPacketMsg msg,
Class<T> clazz)
Initializes a new instance of the
ClientMsg class. |
| Modifier and Type | Method and Description |
|---|---|
void |
deSerialize(byte[] data)
Initializes this client message by deserializing the specified data.
|
EMsg |
getMsgType()
The message type.
|
int |
getSessionID()
Gets the session id for this client message.
|
JobID |
getSourceJobID()
Gets or sets the target job id for this client message.
|
SteamID |
getSteamID()
Gets the
SteamID for this client message. |
JobID |
getTargetJobID()
Gets or sets the target job id for this client message.
|
boolean |
isProto()
Gets a value indicating whether this client message is protobuf backed.
|
byte[] |
serialize()
serializes this client message instance to a byte array.
|
void |
setSessionID(int sessionID)
Sets the session id for this client message.
|
void |
setSourceJobID(JobID jobID)
Sets the target job id for this client message.
|
void |
setSteamID(SteamID steamID)
Sets the
SteamID for this client message. |
void |
setTargetJobID(JobID jobID)
Sets the target job id for this client message.
|
private T extends ISteamSerializableMessage body
public ClientMsg(Class<T> clazz, int payloadReserve)
ClientMsg class.
This is a client send constructor.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientMsg(Class<T> clazz, MsgBase<ExtendedClientMsgHdr> msg)
public ClientMsg(Class<T> clazz, MsgBase<ExtendedClientMsgHdr> msg, int payloadReserve)
ClientMsg class.
This a reply constructor.msg - The message that this instance is a reply for.payloadReserve - The number of bytes to initialize the payload capacity to.public ClientMsg(IPacketMsg msg, Class<T> clazz)
ClientMsg class.
This is a recieve constructor.msg - The packet message to build this client message from.public boolean isProto()
public EMsg getMsgType()
IClientMsgpublic int getSessionID()
public void setSessionID(int sessionID)
public JobID getTargetJobID()
public void setTargetJobID(JobID jobID)
public JobID getSourceJobID()
public void setSourceJobID(JobID jobID)
public byte[] serialize()
throws IOException
serialize in interface IClientMsgserialize in class MsgBase<ExtendedClientMsgHdr>IOExceptionpublic void deSerialize(byte[] data)
throws IOException
deSerialize in interface IClientMsgdeSerialize in class MsgBase<ExtendedClientMsgHdr>data - The data representing a client message.IOExceptionCopyright © 2012. All Rights Reserved.