TransferAuthority
method in Coherence.Toolkit.CoherenceSync
Methods
public void TransferAuthority(ClientID clientID, AuthorityType authorityTransferred, Action<RequestAuthorityResult> onTransferFinished, CancellationToken cancellationToken = default)
Transfers authority over this entity to another client, invoking a callback when the transfer completes.
Parameters
| Type | Name | Description |
|---|---|---|
| ClientID | clientID | ClientID of the client that should get authority over this entity. ClientID can be retrieved from the ClientConnections. |
| AuthorityType | authorityTransferred | Type of authority transferred. |
| Action<RequestAuthorityResult> | onTransferFinished | Callback invoked when the authority transfer has succeeded, failed, or been canceled. |
| CancellationToken | cancellationToken | Token that can be used to cancel the transfer request. |