Skip to main content
Version: 0.4.1

Class RpcBase

Namespace: ReadyM.Api.Multiplayer.RPC
Assembly: ReadyM.Api.Multiplayer.dll

Base class for all RPC handlers, client and server.

public abstract class RpcBase : IHostedService, IDisposable

Inheritance​

object ← RpcBase

Derived​

ClientRpcHandler, ServerRpcClient

Implements​

IHostedService, IDisposable

Inherited Members​

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors​

RpcBase()​

protected RpcBase()

Properties​

RelayClient​

RPC client to use for sending RPCs. This is injected by the DI container.

public IRpcClient RelayClient { protected get; set; }

Property Value​

IRpcClient

Serializer​

Serializer to use for serializing RPC parameters. This is injected by the DI container.

public IRelaySerializer Serializer { protected get; set; }

Property Value​

IRelaySerializer

Methods​

DeInitRpc()​

De-initializes the RPC class, e.g. by unregistering RPC handlers. Generated by the source generator in derived classes.

protected abstract void DeInitRpc()

Dispose()​

public virtual void Dispose()

InitRpc()​

Initializes the RPC class, e.g. by registering RPC handlers. Generated by the source generator in derived classes.

protected abstract void InitRpc()

OnScopeStart()​

Called when the DI container is initialized (on game/server start). This allows the service to perform any necessary setup at the appropriate time, such as registering event handlers.

public virtual void OnScopeStart()