rpclibrary › Globals › “Backend” › RPCServer
A Websocket-server-on-steroids with built-in RPC capabilities
▪ SubResType
+ 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
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
▸ 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