2024-08-01 22:03:59 +00:00
|
|
|
<a id="serve-web-ui-server"></a>
|
|
|
|
|
2024-08-01 01:09:11 +00:00
|
|
|
# serve: Web UI server
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
### *class* Splash.serve.Server(transceiver, catch, onodeID, network, cryptographyInfo, remoteCatchIndex, cache)
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
|
|
Web server that serves the web ui and provides web to node communication
|
|
|
|
|
2024-08-01 22:03:59 +00:00
|
|
|
[🔗 Source](https://git.utopic.work/PierMesh/piermesh/src/branch/main/src/Sponge/serve.py)
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
#### transceiver
|
2024-08-01 01:09:11 +00:00
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
Reference to our Transceiver.Transceiver.Transceiver instance
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
|
|
* **Type:**
|
2024-11-26 17:43:02 +00:00
|
|
|
[Transceiver.Transceiver.Transceiver](/PierMesh/piermesh/src/branch/main/docs/Transceiver/Transceiver.md#Transceiver.Transceiver.Transceiver)
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
|
|
#### network
|
|
|
|
|
|
|
|
Reference to our Siph.Network.Network
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
Siph.Network.Network
|
|
|
|
|
|
|
|
#### nodeID
|
|
|
|
|
|
|
|
String converted PierMesh node ID
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
str
|
|
|
|
|
|
|
|
#### peerIDs
|
|
|
|
|
|
|
|
Map of peer IDs to Websocket sessions
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
dict
|
|
|
|
|
|
|
|
#### app
|
|
|
|
|
|
|
|
Microdot server instance
|
|
|
|
|
|
|
|
#### catch
|
|
|
|
|
2024-08-01 21:09:50 +00:00
|
|
|
Reference to our Catch Cache instance to pull from for serving Catchs
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
[Daisy.Catch.Catch](/PierMesh/piermesh/src/branch/main/docs/Daisy/Catch.md#Daisy.Catch.Catch)
|
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
#### *async* getPSKs()
|
|
|
|
|
|
|
|
Get all PSKs for display
|
|
|
|
|
|
|
|
#### *async* sendToPeer(peerID: str, data: str, target: str)
|
2024-08-01 01:09:11 +00:00
|
|
|
|
|
|
|
Send data to Websocket of peer with peerID
|