You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.__
7
+
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.
8
8
9
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.).
10
10
11
11
Both the server and client support two __transports, HTTP and WebSocket__, and allow more through plugin extensibility.
12
12
13
-
For WebSocket client support it expects W3C compatible WebSocket class instances (browser `WebSocket` and Node.js [websockets/ws](https://github.com/websockets/ws)`WebSocket`). On the Node.js side it is tested to work with [websockets/ws](https://github.com/websockets/ws). `WebSocketServer` implementations are supported only if 100% API compatible with `websockets/ws`, or made compatible through an adapter.
13
+
__Any WebSocket implementation may be used__, handling of the HTTP server and WebSocket is external to these JSONRPC classes.
14
+
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`).
16
+
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.
14
18
15
19
Plugins are allowed to replace the JSON-RPC protocol altogether, extend the protocol or wrap it.
16
20
@@ -369,4 +373,4 @@ __Site B (ES5 browser). WebSocket client (connects to the above WebSocket TCP se
369
373
Open the developer tools console (F12for most browsers, CTRL+SHIFT+Iin Electron) to see errors or manually make calls.
0 commit comments