Table of Contents

Interface IServerAuthenticator

Namespace
FishMMO.Server.Implementation
Assembly
FishMMO.Server.dll

Common interface for server authenticators (both SRP-based and token-based). Provides the Server reference and worker lifecycle methods needed by AttachLoginAuthenticator(IServer<INetworkManagerWrapper, NetworkConnection, IServerBehaviour>).

public interface IServerAuthenticator

Properties

Server

The server instance providing access to AccountManager and other infrastructure.

IServer<INetworkManagerWrapper, NetworkConnection, IServerBehaviour> Server { get; set; }

Property Value

IServer<INetworkManagerWrapper, NetworkConnection, IServerBehaviour>

Methods

AreWorkersDrained()

Returns true when all bounded channels are empty and no worker tasks are still running. Used by the server shutdown coroutine to poll for completion without blocking the main thread.

bool AreWorkersDrained()

Returns

bool

CreateAccountManager()

Creates the appropriate IAccountManager<TConnection> for this authenticator type. SRP authenticators return an SrpAccountManager, token authenticators return a TokenAccountManager.

IAccountManager<NetworkConnection> CreateAccountManager()

Returns

IAccountManager<NetworkConnection>

InitializeWorkers()

Initializes bounded channels and starts async workers for processing auth requests. Called after the Server reference is assigned and infrastructure is ready.

void InitializeWorkers()

ShutdownWorkers()

Gracefully shuts down all async workers and disposes channel resources.

void ShutdownWorkers()