Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

_frontend_.rpcsocket.md 4.4KB

rpclibraryGlobals“Frontend”RPCSocket

Class: RPCSocket

Hierarchy

  • RPCSocket

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new RPCSocket(port: number, server: string, tls: boolean): RPCSocket

Defined in Frontend.ts:15

Parameters:

Name Type Default
port number -
server string -
tls boolean false

Returns: RPCSocket

Properties

port

port: number

Implementation of Socket.port

Defined in Frontend.ts:16


Private server

server: string

Defined in Frontend.ts:16


Private socket

socket: Socket

Defined in Frontend.ts:15


Private tls

tls: boolean

Defined in Frontend.ts:16

Methods

call

call(rpcname: T.Name, …args: T.Any[]): Promise‹T.Any›

Defined in Frontend.ts:40

Parameters:

Name Type
rpcname T.Name
...args T.Any[]

Returns: Promise‹T.Any›


Private callGenerator

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

Defined in Frontend.ts:73

Parameters:

Name Type
fnName T.Name
fnArgs T.Arg[]

Returns: T.AsyncFunction


close

close(): void

Implementation of Socket

Defined in Frontend.ts:36

Returns: void


connect

connect(): Promise‹void›

Defined in Frontend.ts:48

Returns: Promise‹void›


destroy

destroy(): void

Implementation of Socket

Defined in Frontend.ts:32

Returns: void


fire

fire(rpcname: T.Name, …args: T.Any[]): Promise‹T.Any›

Defined in Frontend.ts:44

Parameters:

Name Type
rpcname T.Name
...args T.Any[]

Returns: Promise‹T.Any›


hook

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

Defined in Frontend.ts:20

Parameters:

name: T.Name

handler: function

▸ (…args: any[]): any | Promise‹any›

Parameters:

Name Type
...args any[]

Returns: Socket


Private hookGenerator

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

Defined in Frontend.ts:79

Parameters:

Name Type
fnName T.Name
fnArgs T.Arg[]

Returns: T.HookFunction


info

info(): Promise‹any›

Defined in Frontend.ts:69

Returns: Promise‹any›


on

on(type: “error” | “close”, f: function): Socket

Defined in Frontend.ts:28

Parameters:

type: “error” | “close”

f: function

▸ (e?: any): void

Parameters:

Name Type
e? any

Returns: Socket


unhook

unhook(name: T.Name): Socket

Defined in Frontend.ts:24

Parameters:

Name Type
name T.Name

Returns: Socket