Table of Contents

Interface IServerBehaviourRegistry<TNetworkManager, TConnection, TBehaviour>

Namespace
FishMMO.Server.Core
Assembly
FishMMO.Server.dll

Engine-agnostic interface for the server behaviour registry. Defines the contract for registering, retrieving, and managing server-side behaviours. Extends IServerComponentRegistry for unified component management.

public interface IServerBehaviourRegistry<TNetworkManager, TConnection, TBehaviour> : IServerComponentRegistry<TNetworkManager, TConnection, TBehaviour> where TBehaviour : IServerBehaviour

Type Parameters

TNetworkManager

The network manager type.

TConnection

The connection type.

TBehaviour

The base type of server behaviour to be managed.

Inherited Members

Methods

InitializeAllAsync(IServer, CancellationToken)

Initializes all registered behaviours without blocking the caller's thread, one at a time in registration order so a behaviour may depend on state published by an earlier one. This is the entry point the server startup chain uses: behaviour initialization performs I/O, and the Unity main thread must stay free to drain the continuations that I/O depends on.

Task<IReadOnlyList<(string Name, ServerComponentInitializationStatus Status)>> InitializeAllAsync(IServer server, CancellationToken cancellationToken)

Parameters

server IServer

The server instance.

cancellationToken CancellationToken

Cancelled when the server shuts down mid-startup.

Returns

Task<IReadOnlyList<(string Name, ServerComponentInitializationStatus Status)>>

The behaviours that failed, with their status. Empty when every behaviour initialized.