Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ServerUtils

Index

Constructors

Properties

_utilSettings: any
debugLog: any
uidCounter: any

Methods

  • callClientRPC<T>(eventName: string, src: string | number, data?: unknown): Promise<T>
  • For calling RPC events registered on the client. RPC events will trigger on the client and return client data which is dependent on the logic of the RPC callback.

    Type parameters

    • T = any

      The return data type of the RPC callback

    Parameters

    • eventName: string

      The RPC name to call

    • src: string | number

      The source of the player to call the RPC event on

    • Optional data: unknown

      Optional data to pass to the client through the RPC callback

    Returns Promise<T>

  • The method used whenever handling a promisified event sent by the Client Utils instance

    Type parameters

    • T = any

      Request data type

    • P = any

      Response data type

    Parameters

    • eventName: string

      The event name to listen for

    • callback: NetPromiseCallback<T, P>

      A callback function which provides the request and response data to the caller

    Returns void

Generated using TypeDoc