Skip to content

This example shows how rings network works in wasm and browser envirement.

License

Notifications You must be signed in to change notification settings

RingsNetwork/rings-wasm-p2p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rings Network

An Example of WASM based P2P (browser oriented)

TL;DR

This example shows how rings network (https://github.com/RingsNetwork/rings-node) works with wasm in browser envirement. In the example, you can create arbitrary nodes, and connect them together by manually SDP handshaking or by relay handshaking.

This example is using Rings-node v0.3.0, you can visit it via:

https://rings.rs/rings-wasm-p2p/

Explain

This demo is designed for testing handshakes as well as sending and receiving messages. The implementation is straightforward: you import client, init client, and then client.listen(). All features are implemented through client.request. You can review the details in the button.on_click handlers.

The following documents may be helpful for you: how handshake works: https://rings.gitbook.io/rings-network/advanced-topic/handshake https://rings.gitbook.io/rings-network/advanced-topic/exchange-sdp and API list (you can call json apis via client.request(method`, []): https://rings.gitbook.io/rings-network/advanced-topic/jsonrpc

About

This example shows how rings network works in wasm and browser envirement.

Resources

License

Stars

Watchers

Forks

Packages

No packages published