Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RPCSocket

Hierarchy

  • RPCSocket

Implements

Index

Constructors

constructor

  • new RPCSocket(port: number, server: string, tls?: boolean): RPCSocket
  • Parameters

    • port: number
    • server: string
    • Default value tls: boolean = false

    Returns RPCSocket

Properties

port

port: number

Private server

server: string

Private socket

socket: Socket

Private tls

tls: boolean

Methods

call

  • call(rpcname: T.Name, ...args: T.Any[]): Promise<T.Any>
  • Parameters

    • rpcname: T.Name
    • Rest ...args: T.Any[]

    Returns Promise<T.Any>

Private callGenerator

  • callGenerator(fnName: T.Name, fnArgs: T.Arg[]): T.AsyncFunction
  • Parameters

    • fnName: T.Name
    • fnArgs: T.Arg[]

    Returns T.AsyncFunction

close

  • close(): void
  • Returns void

connect

  • connect(): Promise<void>
  • Returns Promise<void>

destroy

  • destroy(): void
  • Returns void

fire

  • fire(rpcname: T.Name, ...args: T.Any[]): Promise<T.Any>
  • Parameters

    • rpcname: T.Name
    • Rest ...args: T.Any[]

    Returns Promise<T.Any>

hook

  • hook(name: T.Name, handler: function): Socket
  • Parameters

    • name: T.Name
    • handler: function
        • (...args: any[]): any | Promise<any>
        • Parameters

          • Rest ...args: any[]

          Returns any | Promise<any>

    Returns Socket

Private hookGenerator

  • hookGenerator(fnName: T.Name, fnArgs: T.Arg[]): T.HookFunction
  • Parameters

    • fnName: T.Name
    • fnArgs: T.Arg[]

    Returns T.HookFunction

info

  • info(): Promise<any>
  • Returns Promise<any>

on

  • on(type: "error" | "close", f: function): Socket
  • Parameters

    • type: "error" | "close"
    • f: function
        • (e?: any): void
        • Parameters

          • Optional e: any

          Returns void

    Returns Socket

unhook

  • unhook(name: T.Name): Socket
  • Parameters

    • name: T.Name

    Returns Socket

Generated using TypeDoc