Developer Documentation

Room.SendMessage

public virtual Task<RpcResult> SendMessage(string message)
public virtual Task<RpcResult> SendMessage(string message, Encoding encoding)
public virtual Task<RpcResult> SendMessage(byte[] message)

Send "SendMessage" to the server to broadcast the message with default UTF8 encoding.

Info

Be aware that the task is created for resolving Msgpack request/response result as Room. Unless handled correctly should not be awaited by the corresponding context.

Parameters

NameTypeDescription
messageStringUTF8 string
encodingEncodingcustom encoding
messageByte[]arbitrary data

Returns

TypeDescription
Task<RpcResult>Thunk task that will not run (see )

Variants

SendMessage(message)

public virtual Task<RpcResult> SendMessage(string message)

Send "SendMessage" to the server to broadcast the message with default UTF8 encoding.

Warning

Be aware that the task is created for resolving Msgpack request/response result as Room. Unless handled correctly should not be awaited by the corresponding context.

Parameters

NameTypeDescription
messageStringUTF8 string

Returns

TypeDescription
Task<RpcResult>Thunk task that will not run (see )

SendMessage(message, encoding)

public virtual Task<RpcResult> SendMessage(string message, Encoding encoding)

Send "SendMessage" to the server to broadcast the message.

Warning

Be aware that the task is created for resolving Msgpack request/response result as Room. Unless handled correctly should not be awaited by the corresponding context.

Parameters

NameTypeDescription
messageStringstring
encodingEncodingcustom encoding

Returns

TypeDescription
Task<RpcResult>Thunk task that will not run (see )

SendMessage(message)

public virtual Task<RpcResult> SendMessage(byte[] message)

Send "SendMessage" to the server to broadcast an arbitrary message.

Warning

Be aware that the task is created for resolving Msgpack request/response result as Room. Unless handled correctly should not be awaited by the corresponding context.

Parameters

NameTypeDescription
messageByte[]arbitrary data

Returns

TypeDescription
Task<RpcResult>Thunk task that will not run (see )