Class ClientMsg<BodyType extends ISteamSerializableMessage>

    • Constructor Detail

      • ClientMsg

        public ClientMsg​(java.lang.Class<? extends BodyType> bodyType)
        Initializes a new instance of the ClientMsg class.
        Parameters:
        bodyType - body type
      • ClientMsg

        public ClientMsg​(java.lang.Class<? extends BodyType> bodyType,
                         int payloadReserve)
        Initializes a new instance of the ClientMsg class.
        Parameters:
        bodyType - body type
        payloadReserve - The number of bytes to initialize the payload capacity to.
      • ClientMsg

        public ClientMsg​(java.lang.Class<? extends BodyType> bodyType,
                         MsgBase<ExtendedClientMsgHdr> msg)
        Initializes a new instance of the ClientMsg class. This a reply constructor.
        Parameters:
        bodyType - body type
        msg - The message that this instance is a reply for.
      • ClientMsg

        public ClientMsg​(java.lang.Class<? extends BodyType> bodyType,
                         MsgBase<ExtendedClientMsgHdr> msg,
                         int payloadReserve)
        Initializes a new instance of the ClientMsg class. This a reply constructor.
        Parameters:
        bodyType - body type
        msg - The message that this instance is a reply for.
        payloadReserve - The number of bytes to initialize the payload capacity to.
      • ClientMsg

        public ClientMsg​(java.lang.Class<? extends BodyType> bodyType,
                         IPacketMsg msg)
        Initializes a new instance of the ClientMsg class. This a receive constructor.
        Parameters:
        bodyType - body type
        msg - The packet message to build this client message from.
    • Method Detail

      • isProto

        public boolean isProto()
        Description copied from interface: IClientMsg
        Gets a value indicating whether this client message is protobuf backed.
        Returns:
        true if this instance is protobuf backed; otherwise, false.
      • getMsgType

        public EMsg getMsgType()
        Description copied from interface: IClientMsg
        Gets the network message type of this client message.
        Returns:
        The message type.
      • getSessionID

        public int getSessionID()
        Description copied from interface: IClientMsg
        Gets the session id for this client message.
        Returns:
        The session id.
      • setSessionID

        public void setSessionID​(int sessionID)
        Description copied from interface: IClientMsg
        Sets the session id for this client message.
        Parameters:
        sessionID - The session id.
      • setSteamID

        public void setSteamID​(SteamID steamID)
        Description copied from interface: IClientMsg
        Sets the SteamID for this client message.
        Parameters:
        steamID - The SteamID.
      • getTargetJobID

        public JobID getTargetJobID()
        Description copied from interface: IClientMsg
        Gets the target job id for this client message.
        Returns:
        The target job id.
      • setTargetJobID

        public void setTargetJobID​(JobID jobID)
        Description copied from interface: IClientMsg
        Sets the target job id for this client message.
        Parameters:
        jobID - The target job id.
      • getSourceJobID

        public JobID getSourceJobID()
        Description copied from interface: IClientMsg
        Gets the source job id for this client message.
        Returns:
        The source job id.
      • setSourceJobID

        public void setSourceJobID​(JobID jobID)
        Description copied from interface: IClientMsg
        Sets the source job id for this client message.
        Parameters:
        jobID - The source job id.
      • serialize

        public byte[] serialize()
        Description copied from interface: IClientMsg
        serializes this client message instance to a byte array.
        Returns:
        Data representing a client message.
      • deserialize

        public void deserialize​(byte[] data)
        Description copied from interface: IClientMsg
        Initializes this client message by deserializing the specified data.
        Parameters:
        data - The data representing a client message.
      • getBody

        public BodyType getBody()
        Returns:
        the body structure of this message.