@gobark/udprpc
Advanced tools
Comparing version 0.0.4 to 0.1.0
{ | ||
"name": "@gobark/udprpc", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "A UDP-based JSON-RPC 2.0 library for peer-to-peer communications with support for ES6 promises", | ||
@@ -16,2 +16,5 @@ "main": "dist/code/UdpRpc.js", | ||
], | ||
"keywords": [ | ||
"udp", "dgram", "json-rpc" | ||
], | ||
"repository": { | ||
@@ -18,0 +21,0 @@ "type": "git", |
[![Build Status](https://travis-ci.org/perspectivus1/udprpc.svg?branch=master)](https://travis-ci.org/perspectivus1/udprpc) | ||
# UdpRpc # | ||
This is a UDP-based JSON-RPC 2.0 library for peer-to-peer communications with support for ES6 promises. | ||
This is a UDP-based JSON-RPC 2.0 library with support for ES6 promises. One common use-case would be for for peer-to-peer communications. | ||
This library is (nearly) compliant with the JSON-RPC 2.0 Specification http://www.jsonrpc.org/specification. | ||
This library is (nearly) compliant with the JSON-RPC 2.0 Specification at [http://www.jsonrpc.org/specification](http://www.jsonrpc.org/specification). | ||
Missing: Support JSON-RPC batch requests and reponses. | ||
Missing: Support JSON-RPC batch requests and reponses (see [Contribution](#contribution) section below). | ||
## Installation ## | ||
``` | ||
```bash | ||
npm install @gobark/udprpc | ||
@@ -22,3 +22,2 @@ ``` | ||
```javascript | ||
const url = require("url"); | ||
// import UdpRpc | ||
@@ -31,3 +30,3 @@ const UdpRpc = require("@gobark/udprpc").UdpRpc; | ||
// handle incoming requests | ||
udpRpcServer.register((method, params, url, resolve, reject) => { | ||
udpRpcServer.register((method, params, address, port, resolve, reject) => { | ||
switch (method) { | ||
@@ -71,3 +70,8 @@ case "sum": { | ||
## Contribution guidelines ## | ||
## Contribution ## | ||
### Feature requests ### | ||
* Support JSON-RPC [batch](http://www.jsonrpc.org/specification#batch) requests and reponses | ||
* Implement secure UDP communications ([DTLS](https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security)) | ||
### Modifying this package ### | ||
[See CONTRIBUTING.md](./CONTRIBUTING.md) | ||
@@ -74,0 +78,0 @@ |
35388
79