wwRPC (aka web-to-web RPC) is a light weight library in JavaScript that makes RPC calls in REST-style operations over the Websocket. wwwRPC is a sub-project of WoT.City and the technical details can be found at WoT.City white paper
wwRPC uses REST-style RPC operations over the WebSocket in IoT devices. The wwRPC aims to help IoT devices to make REST-style RPC calls. In addition, it is the underlying component of WoT.City software framework that can be accordingly used in a peer-to-peer IoT network.
Create a new wwRPC instance.
- from is the URI of the sender, for example
ws://wot.city/object/2fc89af
- to is the URI of the receiver, for example
ws://wot.city/object/2fc89af/send
Send a RPC message. message
must be serialized before sending.
Serializ a RPC message.
Deserialize a RPC message.