Dojo
Loading...
Searching...
No Matches
Dojo.DojoMessage Class Reference

A raw message in Dojo network, transferred in Nakama match. More...

Public Member Functions

 DojoMessage (IMatchState state)
 Construct given Nakama.IMatchState recevied from Nakama match.
 
 DojoMessage (byte[] data)
 Construct a placeholder message for data.
 
 DojoMessage (string data)
 Construct a placeholder message for data.
 
string GetString ()
 Get message data as UTF8 string.
 
object GetUnderlyingMessage ()
 
GetDecodedData< T > ()
 Decode message data into JSON-like data T.
 

Static Public Member Functions

static T GetDecodedData< T > (string data)
 Decode message data into JSON-like data T.
 

Public Attributes

readonly byte[] RawData
 
readonly long OpCode
 
readonly IUserPresence Sender
 

Detailed Description

A raw message in Dojo network, transferred in Nakama match.

Constructor & Destructor Documentation

◆ DojoMessage() [1/3]

Dojo.DojoMessage.DojoMessage ( IMatchState  state)
inline

Construct given Nakama.IMatchState recevied from Nakama match.

Parameters
statemessage data

◆ DojoMessage() [2/3]

Dojo.DojoMessage.DojoMessage ( byte[]  data)
inline

Construct a placeholder message for data.

Parameters
dataraw message data

◆ DojoMessage() [3/3]

Dojo.DojoMessage.DojoMessage ( string  data)
inline

Construct a placeholder message for data.

Parameters
datamessage content

Member Function Documentation

◆ GetDecodedData< T >() [1/2]

T Dojo.DojoMessage.GetDecodedData< T > ( )
inline

Decode message data into JSON-like data T.

Template Parameters
Ta JSON-like type
Returns
decoded data

◆ GetDecodedData< T >() [2/2]

static T Dojo.DojoMessage.GetDecodedData< T > ( string  data)
inlinestatic

Decode message data into JSON-like data T.

Template Parameters
Ta JSON-like type
Parameters
dataencoded JSON message content
Returns
decoded data

◆ GetString()

string Dojo.DojoMessage.GetString ( )
inline

Get message data as UTF8 string.

Returns
message content

Member Data Documentation

◆ OpCode

readonly long Dojo.DojoMessage.OpCode

Message type identifier

◆ RawData

readonly byte [] Dojo.DojoMessage.RawData

Raw data in byte array

◆ Sender

readonly IUserPresence Dojo.DojoMessage.Sender

Sender presence on Nakama


The documentation for this class was generated from the following file: