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.
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
Name | Type | Description |
---|---|---|
message | String | UTF8 string |
encoding | Encoding | custom encoding |
message | Byte[] | arbitrary data |
Returns
Type | Description |
---|---|
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.
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
Name | Type | Description |
---|---|---|
message | String | UTF8 string |
Returns
Type | Description |
---|---|
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.
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
Name | Type | Description |
---|---|---|
message | String | string |
encoding | Encoding | custom encoding |
Returns
Type | Description |
---|---|
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.
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
Name | Type | Description |
---|---|---|
message | Byte[] | arbitrary data |
Returns
Type | Description |
---|---|
Task<RpcResult> | Thunk task that will not run (see |