Interface ITextChatService
Inherited Members
Namespace: Unity.Cloud.Presence
Syntax
public interface ITextChatService : IParticipantProvider<TextParticipant?>
Properties
Connected
Gets if the service is connected.
Declaration
bool Connected { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
MessageHistory
Gets the collection of incoming messages.
Declaration
IEnumerable<TextChatMessage> MessageHistory { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<TextChatMessage> |
Methods
JoinAsync()
Joins the text service for the current channel.
Declaration
Task JoinAsync()
Returns
| Type | Description |
|---|---|
| Task | Returns a task representing the request to join the channel for the current room. |
LeaveAsync()
Leaves the current text channel.
Declaration
Task LeaveAsync()
Returns
| Type | Description |
|---|---|
| Task | Returns a task representing the request to leave the current channel. |
SendMessageAsync(String)
Sends a message to all participants connected in this channel.
Declaration
Task SendMessageAsync(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message |
Returns
| Type | Description |
|---|---|
| Task | Returns a task representing the message sent. |
Events
MessageReceived
Calls the methods in its invocation list when there is any new message in the text channel.
Declaration
event Action<TextChatMessage> MessageReceived
Event Type
| Type | Description |
|---|---|
| Action<TextChatMessage> |