Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ClientUtils

Index

Constructors

Properties

_settings: any
debugLog: any
uidCounter: any

Methods

  • emitNetPromise<T>(eventName: string, data: unknown): Promise<T>
  • Emit a promisified event towards the server which will resolve once the server responds.

    Type parameters

    • T = any

    Parameters

    • eventName: string

      The event name

    • data: unknown

      The data you wish to send with the request

    Returns Promise<T>

  • registerNuiProxy(event: string): void
  • Will Register an NUI event callback that will immediately proxy to a server side promisified event of the same name. Once the server responds and resolves the promise on the client, this function will callback to the NUI and resolve the original HTTP request.

    Parameters

    • event: string

      The event name to listen for

    Returns void

  • registerRPCListener<T, R>(eventName: string, cb: RPCListenerCb<T, R>): void
  • Register a listener for the RPC system which can then be triggered by the server side RPC call.

    Type parameters

    • T = any

    • R = any

    Parameters

    • eventName: string

      The event name to listen for

    • cb: RPCListenerCb<T, R>

      The callback function that returns the desired value back to the server

    Returns void

  • Change the settings for this instance by passing a new config

    Parameters

    Returns void

Generated using TypeDoc