You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_backend_.rpcserver.md 3.3KB

rpclibraryGlobals“Backend”RPCServer

Class: RPCServer <SubResType>

A Websocket-server-on-steroids with built-in RPC capabilities

Type parameters

SubResType

Hierarchy

  • RPCServer

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new RPCServer(port: number, exporters: RPCExporter‹SubResType›[], conf: T.SocketConf): RPCServer

Defined in Backend.ts:22

throws On RPC with no name

Parameters:

Name Type Default Description
port number - The port to listen on
exporters RPCExporter‹SubResType›[] [] A list of RPCExporter to publish
conf T.SocketConf {} A SocketConf object with optional settings

Returns: RPCServer

Properties

Private closeHandler

closeHandler: T.CloseHandler

Defined in Backend.ts:20


Private connectionHandler

connectionHandler: T.ConnectionHandler

Defined in Backend.ts:22


Private errorHandler

errorHandler: T.ErrorHandler

Defined in Backend.ts:21


Private exporters

exporters: RPCExporter‹SubResType›[]

Defined in Backend.ts:32

A list of RPCExporter to publish


Private io

io: any = bsock.createServer()

Defined in Backend.ts:18


Private port

port: number

Defined in Backend.ts:31

The port to listen on


Private visibility

visibility: T.Visibility

Defined in Backend.ts:19


Private ws

ws: Server = http.createServer()

Defined in Backend.ts:17

Methods

destroy

destroy(): Promise‹void›

Implementation of Destroyable

Defined in Backend.ts:89

Returns: Promise‹void›


Protected initRPCs

initRPCs(socket: Socket): void

Defined in Backend.ts:82

Parameters:

Name Type
socket Socket

Returns: void


Private startWebsocket

startWebsocket(): void

Defined in Backend.ts:66

Returns: void