Skip to content

A light weight library that makes REST-style RPC operations over the Websocket

License

Notifications You must be signed in to change notification settings

flowchain/wwRPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: web-to-web RPC

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.

API

rpc = new RPC(from, to)

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

rpc.send(message)

Send a RPC message. message must be serialized before sending.

rpc.serialize(message)

Serializ a RPC message.

rpc.deserialize(message)

Deserialize a RPC message.

About

A light weight library that makes REST-style RPC operations over the Websocket

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published