@xyzblocks/rpc-tcp
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

RPC

Remote Procedure Call (TCP/TLS)

Build Status

Installation

npm install @xyzblocks/rpc-tcp --save

API

TcpRpc extends Rpc

Properties

  • socket: net.Socket | tls.TLSSocket

Methods

  • close(): Promise<void>
  • send(method: string, params: Array<any>): Promise<any>
  • sendNotification(method: string, params: Array<any>): Promise<void>

TcpRpcClient

Properties

  • host: string
  • port: number

Methods

  • close(): Promise<void>
  • connect(): Promise<void>
  • connectWithRetry(interval: number, maxRetries: number): Promise<void>
  • send(method: string, params: Array<any>): Promise<any>
  • sendNotification(method: string, params: Array<any>): Promise<void>

TcpRpcServer

Properties

  • port: number

Methods

  • close(): Promise<void>
  • listen(): Promise<void>
  • send(method: string, params: Array<any>): Promise<Array<any>>
  • sendNotification(method: string, params: Array<any>): Promise<void>
  • sendSingle(ipAddress: string, method: string, params: Array<any>): Promise<any>
  • sendSingleNotification(ipAddress: string, method: string, params: Array<any>): Promise<void>

TcpTlsRpcClient

Properties

  • host: string
  • port: number

Methods

  • close(): Promise<void>
  • connect(): Promise<void>
  • connectWithRetry(interval: number, maxRetries: number): Promise<void>
  • send(method: string, params: Array<any>): Promise<any>
  • sendNotification(method: string, params: Array<any>): Promise<void>

TcpTlsRpcServer

Properties

  • port: number

Methods

  • close(): Promise<void>
  • listen(): Promise<void>
  • send(method: string, params: Array<any>): Promise<Array<any>>
  • sendNotification(method: string, params: Array<any>): Promise<void>
  • sendSingle(ipAddress: string, method: string, params: Array<any>): Promise<any>
  • sendSingleNotification(ipAddress: string, method: string, params: Array<any>): Promise<void>

Readme

Keywords

none

Package Sidebar

Install

npm i @xyzblocks/rpc-tcp

Weekly Downloads

15

Version

1.0.12

License

MIT

Unpacked Size

44.2 kB

Total Files

24

Last publish

Collaborators

  • xyzblocks