[rpclibrary](../globals.md) › ["Backend"](../modules/_backend_.md) › [RPCServer](_backend_.rpcserver.md) # Class: RPCServer <**SubResType**> ## Type parameters ▪ **SubResType** ## Hierarchy * **RPCServer** ## Implements * [Destroyable](../interfaces/_interfaces_.destroyable.md) ## Index ### Constructors * [constructor](_backend_.rpcserver.md#constructor) ### Properties * [closeHandler](_backend_.rpcserver.md#private-closehandler) * [connectionHandler](_backend_.rpcserver.md#private-connectionhandler) * [errorHandler](_backend_.rpcserver.md#private-errorhandler) * [exporters](_backend_.rpcserver.md#private-exporters) * [io](_backend_.rpcserver.md#private-io) * [port](_backend_.rpcserver.md#private-port) * [visibility](_backend_.rpcserver.md#private-visibility) * [ws](_backend_.rpcserver.md#private-ws) ### Methods * [destroy](_backend_.rpcserver.md#destroy) * [initRPCs](_backend_.rpcserver.md#protected-initrpcs) * [startWebsocket](_backend_.rpcserver.md#private-startwebsocket) ## Constructors ### constructor \+ **new RPCServer**(`port`: number, `exporters`: [Exporter](../interfaces/_interfaces_.exporter.md)‹SubResType›[], `conf`: T.SocketConf): *[RPCServer](_backend_.rpcserver.md)* Defined in Backend.ts:19 **Parameters:** Name | Type | Default | ------ | ------ | ------ | `port` | number | - | `exporters` | [Exporter](../interfaces/_interfaces_.exporter.md)‹SubResType›[] | [] | `conf` | T.SocketConf | {} | **Returns:** *[RPCServer](_backend_.rpcserver.md)* ## Properties ### `Private` closeHandler • **closeHandler**: *T.CloseHandler* Defined in Backend.ts:17 ___ ### `Private` connectionHandler • **connectionHandler**: *T.ConnectionHandler* Defined in Backend.ts:19 ___ ### `Private` errorHandler • **errorHandler**: *T.ErrorHandler* Defined in Backend.ts:18 ___ ### `Private` exporters • **exporters**: *[Exporter](../interfaces/_interfaces_.exporter.md)‹SubResType›[]* Defined in Backend.ts:23 ___ ### `Private` io • **io**: *any* = bsock.createServer() Defined in Backend.ts:15 ___ ### `Private` port • **port**: *number* Defined in Backend.ts:22 ___ ### `Private` visibility • **visibility**: *T.Visibility* Defined in Backend.ts:16 ___ ### `Private` ws • **ws**: *Server* = http.createServer() Defined in Backend.ts:14 ## Methods ### destroy ▸ **destroy**(): *Promise‹void›* *Implementation of [Destroyable](../interfaces/_interfaces_.destroyable.md)* Defined in Backend.ts:80 **Returns:** *Promise‹void›* ___ ### `Protected` initRPCs ▸ **initRPCs**(`socket`: [Socket](../interfaces/_interfaces_.socket.md)): *void* Defined in Backend.ts:73 **Parameters:** Name | Type | ------ | ------ | `socket` | [Socket](../interfaces/_interfaces_.socket.md) | **Returns:** *void* ___ ### `Private` startWebsocket ▸ **startWebsocket**(): *void* Defined in Backend.ts:57 **Returns:** *void*