Skip to content

Commit 7260e42

Browse files
authored
Merge pull request #14 from oxygens/master
Updated README
2 parents b9f8c77 + 226cab1 commit 7260e42

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.MD

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,30 @@
66

77
A main goal of this project is to have the JSON-RPC server and client support __bidirectional JSON-RPC requests over a single WebSocket connection.__ Simply put, it makes it possible to have a JSONRPC __Server__ in the browser and a separate one in the back-end.
88

9-
This library is tested in __browsers__ (at least Internet Explorer 10) and in __Node.js__ (at least 7.8, or 7.x with the --harmony flag.).
9+
This library is tested in __browsers__ (>= IE10) and in __Node.js__ (>=7.8).
10+
11+
12+
## Transports
1013

1114
Both the server and client support two __transports, HTTP and WebSocket__, and allow more through plugin extensibility.
1215

13-
__Any WebSocket implementation may be used__, handling of the HTTP server and WebSocket is external to these JSONRPC classes.
16+
#### WebSocket
17+
18+
__Any WebSocket implementation may be used__, as handling of the HTTP server and WebSocket is external to these JSONRPC classes.
19+
20+
For WebSocket client support in Node.js and browsers, `JSONRPC.Plugins.Client.WebSocketTransport` accepts connected W3C compatible WebSocket class instances (out of the box browser [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) and Node.js [websockets/ws](https://github.com/websockets/ws) `WebSocket`).
21+
22+
On the Node.js side, this library is tested to work with [websockets/ws](https://github.com/websockets/ws). Other `WebSocketServer` implementations are supported if API compatible with `websockets/ws` (constructor and events), or made compatible through an adapter.
23+
24+
#### HTTP
25+
26+
`JSONRPC.Client` has embeded support for HTTP requests, through [fetch](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) (polyfills for older browsers exist, and work just fine).
27+
28+
#### Other
1429

15-
For WebSocket client support, it expects W3C compatible WebSocket class instances (out of the box browser `WebSocket` and Node.js [websockets/ws](https://github.com/websockets/ws) `WebSocket`).
30+
It is easy to support other transports, see `JSONRPC.Plugins.Client.WebSocketTransport` for an example.
1631

17-
On the Node.js side it is tested to work with [websockets/ws](https://github.com/websockets/ws). Other `WebSocketServer` implementations are supported if API compatible with `websockets/ws` (constructor and events), or made compatible through an adapter.
32+
## Events and plugins
1833

1934
Plugins are allowed to replace the JSON-RPC protocol altogether, extend the protocol or wrap it.
2035

0 commit comments

Comments
 (0)