Show / Hide Table of Contents

Interface IClientManagerAdapter<TKey, TClient>

Establishes connections with the specified TKey.

Namespace: Microsoft.XboxStudios.ClientManager
Assembly: ClientManager.Abstractions.dll
Syntax
public interface IClientManagerAdapter<TKey, TClient> where TKey : notnull where TClient : class
Type Parameters
Name Description
TKey

The key object that contains the TClient.

TClient

The client type.

Methods

View Source

ConnectAsync(TClient, CancellationOptions?)

Connects a client to a game instance.

Declaration
ValueTask ConnectAsync(TClient client, CancellationOptions? co = null)
Parameters
Type Name Description
TClient client

The client to connect.

CancellationOptions? co

The Microsoft.XboxStudios.Bifrost.CancellationOptions.

Returns
Type Description
ValueTask

A Task that represents the asynchronous operation.

View Source

CreateFor(TKey)

Gets the client for a specific TKey.

Declaration
TClient? CreateFor(TKey key)
Parameters
Type Name Description
TKey key

The key to use.

Returns
Type Description
TClient

The client assosciated with the requested key.

View Source

Disconnect(TClient)

Disconnects a client from a game instance synchronously.

Declaration
void Disconnect(TClient client)
Parameters
Type Name Description
TClient client

The client to disconnect.

View Source

DisconnectAsync(TClient)

Disconnects a client from a game instance asynchronously.

Declaration
ValueTask DisconnectAsync(TClient client)
Parameters
Type Name Description
TClient client

The client to disconnect.

Returns
Type Description
ValueTask

A Task that represents the asynchronous operation.

View Source

LogException(TClient?, Exception)

A log method used to log exceptions when connecting or disconnecting clients.

Declaration
void LogException(TClient? client, Exception e)
Parameters
Type Name Description
TClient client

The client that experienced the exception.

Exception e

The exception that was thrown.

View Source

NeedsToConnect(TClient)

Checks whether a client needs to connect or not.

Declaration
bool NeedsToConnect(TClient client)
Parameters
Type Name Description
TClient client

The client to check for.

Returns
Type Description
bool

True if client needs to connect. False otherwise.

  • View Source
In this article
Back to top Generated by DocFX