Table of Contents

Interface IServerComponent<TNetworkManager, TServerManager, TConnection, TServerComponent>

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

Generic interface for server components that require initialization and lifecycle management. This is the base interface for all server components including behaviours and data containers.

public interface IServerComponent<TNetworkManager, TServerManager, TConnection, TServerComponent> : IServerComponent where TServerComponent : IServerComponent

Type Parameters

TNetworkManager

The concrete network manager or wrapper type exposed by the server.

TServerManager

The concrete server manager type exposed by the server.

TConnection

The transport's connection representation.

TServerComponent

The concrete server component type (for type safety).

Properties

Initialized

Indicates whether this component has been initialized by the server runtime.

bool Initialized { get; }

Property Value

bool

Server

Reference to the server instance associated with this component.

IServer<TNetworkManager, TConnection, TServerComponent> Server { get; }

Property Value

IServer<TNetworkManager, TConnection, TServerComponent>

ServerManager

Reference to the server manager instance associated with this component.

TServerManager ServerManager { get; }

Property Value

TServerManager

Methods

Deinitialize()

Called when the component is being deinitialized. Implementers should release resources and unregister any external callbacks here.

void Deinitialize()

InitializeOnce()

Called once by the server runtime to initialize the component. Implementers should perform one-time setup here. This method is guaranteed to be invoked at most once per component instance.

ServerComponentInitializationStatus InitializeOnce()

Returns

ServerComponentInitializationStatus