Interface IChannel
Channel object. Use Create
Inherited Members
Namespace: Unity.Services.Wire.Internal
Assembly: Unity.Services.Core.Internal.dll
Syntax
public interface IChannel : IDisposable
Methods
SubscribeAsync()
SubscribeAsync will subscribe to the channel. Possible error codes are:
- 23002 -> "CommandFailed"
- 23003 -> "ConnectionFailed"
- 23004 -> "InvalidToken"
- 23005 -> "InvalidChannelName"
- 23006 -> "TokenRetrieverFailed"
- 23007 -> "Unauthorized"
- 23008 -> "AlreadySubscribed"
Declaration
Task SubscribeAsync()
Returns
Type | Description |
---|---|
Task | An awaitable task. |
UnsubscribeAsync()
UnsubscribeAsync will stop the subscription, effective immediately. Possible error codes are:
- 23002 -> "CommandFailed"
- 23009 -> "AlreadyUnsubscribed"
Declaration
Task UnsubscribeAsync()
Returns
Type | Description |
---|---|
Task | An awaitable task. |
Events
BinaryMessageReceived
Handler called each time the channel receives a binary message.
Declaration
event Action<byte[]> BinaryMessageReceived
Event Type
ErrorReceived
Handler called whenever the subscription encounters an error. A description of the error is passed as an argument.
Declaration
event Action<string> ErrorReceived
Event Type
KickReceived
Handler called if the subscription gets terminated by the Wire server.
Declaration
event Action KickReceived
Event Type
Type | Description |
---|---|
Action |
MessageReceived
Handler called each time the channel receives a message.
Declaration
event Action<string> MessageReceived
Event Type
NewStateReceived
Handler called whenever the subscription reliability changes.
Declaration
event Action<SubscriptionState> NewStateReceived
Event Type
Type | Description |
---|---|
Action<Subscription |