Table of Contents

Class Server

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

Composition root: orchestrates Core and Implementation into a running server.

public class Server : MonoBehaviour, IServer<INetworkManagerWrapper, NetworkConnection, IServerBehaviour>, IServer<INetworkManagerWrapper, NetworkConnection, IRuntimeDataContainer>, IServer, IPeriodicUpdateSystem
Inheritance
Object
Component
Behaviour
MonoBehaviour
Server
Implements
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Properties

AccountManager

Gets the account manager instance.

public IAccountManager<NetworkConnection> AccountManager { get; }

Property Value

IAccountManager<NetworkConnection>

AddressOverride

Optional override for the server's bind address.

[Header("Overrides")]
public string AddressOverride { get; set; }

Property Value

string

AddressProvider

Gets the server address provider instance.

public IServerAddressProvider AddressProvider { get; }

Property Value

IServerAddressProvider

BehaviourRegistry

Registry that manages all server behaviours.

public IServerBehaviourRegistry<INetworkManagerWrapper, NetworkConnection, IServerBehaviour> BehaviourRegistry { get; }

Property Value

IServerBehaviourRegistry<INetworkManagerWrapper, NetworkConnection, IServerBehaviour>

Configuration

Gets the server configuration instance.

public IServerConfiguration Configuration { get; }

Property Value

IServerConfiguration

CoreServer

Gets the core server logic instance.

public ICoreServer CoreServer { get; }

Property Value

ICoreServer

DataContainerRegistry

Registry that manages all runtime data containers.

public IServerComponentRegistry<INetworkManagerWrapper, NetworkConnection, IRuntimeDataContainer> DataContainerRegistry { get; }

Property Value

IServerComponentRegistry<INetworkManagerWrapper, NetworkConnection, IRuntimeDataContainer>

Database

Gets the database orchestrator providing centralized access to the service registry, health monitoring, metrics, and the context factory.

public IDatabase Database { get; }

Property Value

IDatabase

NetworkWrapper

Gets the network manager wrapper instance.

public INetworkManagerWrapper NetworkWrapper { get; }

Property Value

INetworkManagerWrapper

PortOverride

Optional override for the server's bind port.

public ushort PortOverride { get; set; }

Property Value

ushort

ServerEvents

Gets the server events instance.

public IServerEvents ServerEvents { get; }

Property Value

IServerEvents

ServerState

Gets the current connection state of the server.

public ConnectionState ServerState { get; }

Property Value

ConnectionState

Methods

Quit()

Quits the application or exits play mode in the Unity Editor.

public static void Quit()

RegisterPeriodicCallback(float, Action<float>)

Registers a callback to be invoked periodically at the specified interval.

public void RegisterPeriodicCallback(float interval, Action<float> callback)

Parameters

interval float

Time in seconds between callback invocations.

callback Action<float>

The callback to invoke. Receives delta time since last invocation.

UnregisterPeriodicCallback(Action<float>)

Unregisters a previously registered periodic callback.

public void UnregisterPeriodicCallback(Action<float> callback)

Parameters

callback Action<float>

The callback to unregister.

UpdateCallbackInterval(Action<float>, float)

Updates the interval for an existing periodic callback.

public void UpdateCallbackInterval(Action<float> callback, float newInterval)

Parameters

callback Action<float>

The callback whose interval to update.

newInterval float

The new interval in seconds.