Skip to content

getlantern/lantern-water

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lantern-water

This library wraps the water implementation with the intention to make a easy integration between listener/client services (such as http-proxy and flashlight) and water. It also provides a way to fetch and manage WASM files locally so the listener or dialer just can use the provided version available.

A C4 Component diagram describing how the components interact with each other. In the diagram, a dialer app is responsible for initializing the version control manager (VC) and if the WASM file is not available locally, it'll try to download the WASM file from the given URL or magnet link. When the WASM file is available in memory, the dialer app will create a dialer and make a connection with the given listener address. The diagram also show the listener app perspective, the listener download the WASM file, load in memory and create a water listener. The listener also accept connections and read the received message/bytes.

There are two programs available in this library: Dialer and Listener. The Dialer is used to create connections to a listener and send data through a given protocol implementation. The Listener is used for accepting connections from a client using the given WASM transport and in this case it only prints the connection message as an example. They can be executed with the following commands:

go run cmd/listener/main.go

And in another terminal (to send a "hello world" message to the listener):

go run cmd/dialer/main.go

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages