@mainframe/rpc-node
RPC for node
Last updated 3 years ago by paul_lecam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mainframe/rpc-node 
SYNC missed versions from official npm registry.

rpc-node

rpc-request or rpc-stream factory with automatic transport selection.

Installation

yarn add @mainframe/rpc-node

Usage

import nodeRPC from '@mainframe/rpc-node'

const rpcOverHTTP = nodeRPC('http://localhost') // RequestRPC using HTTP transport
const rpcOverWS = nodeRPC('ws://localhost') // StreamRPC using WebSocket transport
const rpcOverIPC = nodeRPC('/path/to/socket') // StreamRPC using ICP transport

API

nodeRPC()

Arguments

  1. endpoint: string: socket path, HTTP or WebSocket URL to connect to.

Returns RequestRPC (with HTTP endpoint) or StreamRPC (with IPC or WebSocket endpoint).

License

MIT

Current Tags

  • 0.3.0                                ...           latest (2 years ago)

6 Versions

  • 0.3.0                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 8
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |