[rpclibrary](../globals.md) › ["Frontend"](../modules/_frontend_.md) › [RPCSocket](_frontend_.rpcsocket.md) # Class: RPCSocket ## Hierarchy * **RPCSocket** ## Implements * [Socket](../interfaces/_interfaces_.socket.md) ## Index ### Constructors * [constructor](_frontend_.rpcsocket.md#constructor) ### Properties * [port](_frontend_.rpcsocket.md#port) * [server](_frontend_.rpcsocket.md#private-server) * [socket](_frontend_.rpcsocket.md#private-socket) * [tls](_frontend_.rpcsocket.md#private-tls) ### Methods * [call](_frontend_.rpcsocket.md#call) * [callGenerator](_frontend_.rpcsocket.md#private-callgenerator) * [close](_frontend_.rpcsocket.md#close) * [connect](_frontend_.rpcsocket.md#connect) * [destroy](_frontend_.rpcsocket.md#destroy) * [fire](_frontend_.rpcsocket.md#fire) * [hook](_frontend_.rpcsocket.md#hook) * [hookGenerator](_frontend_.rpcsocket.md#private-hookgenerator) * [info](_frontend_.rpcsocket.md#info) * [on](_frontend_.rpcsocket.md#on) * [unhook](_frontend_.rpcsocket.md#unhook) ## Constructors ### constructor \+ **new RPCSocket**(`port`: number, `server`: string, `tls`: boolean): *[RPCSocket](_frontend_.rpcsocket.md)* Defined in Frontend.ts:15 **Parameters:** Name | Type | Default | ------ | ------ | ------ | `port` | number | - | `server` | string | - | `tls` | boolean | false | **Returns:** *[RPCSocket](_frontend_.rpcsocket.md)* ## Properties ### port • **port**: *number* *Implementation of [Socket](../interfaces/_interfaces_.socket.md).[port](../interfaces/_interfaces_.socket.md#port)* Defined in Frontend.ts:16 ___ ### `Private` server • **server**: *string* Defined in Frontend.ts:16 ___ ### `Private` socket • **socket**: *[Socket](../interfaces/_interfaces_.socket.md)* 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](../interfaces/_interfaces_.socket.md)* 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](../interfaces/_interfaces_.socket.md)* 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](../interfaces/_interfaces_.socket.md)* Defined in Frontend.ts:20 **Parameters:** ▪ **name**: *T.Name* ▪ **handler**: *function* ▸ (...`args`: any[]): *any | Promise‹any›* **Parameters:** Name | Type | ------ | ------ | `...args` | any[] | **Returns:** *[Socket](../interfaces/_interfaces_.socket.md)* ___ ### `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](../interfaces/_interfaces_.socket.md)* Defined in Frontend.ts:28 **Parameters:** ▪ **type**: *"error" | "close"* ▪ **f**: *function* ▸ (`e?`: any): *void* **Parameters:** Name | Type | ------ | ------ | `e?` | any | **Returns:** *[Socket](../interfaces/_interfaces_.socket.md)* ___ ### unhook ▸ **unhook**(`name`: T.Name): *[Socket](../interfaces/_interfaces_.socket.md)* Defined in Frontend.ts:24 **Parameters:** Name | Type | ------ | ------ | `name` | T.Name | **Returns:** *[Socket](../interfaces/_interfaces_.socket.md)*