-
Notifications
You must be signed in to change notification settings - Fork 1
Namespace
Michael Palumbo edited this page Jun 26, 2020
·
17 revisions
Document all address patterns for messaging across the mischmasch/teaparty system. Under "messages", list the 'cmd' (i.e. incomingDelta
), what it's for, source and destination, etc. Try to wrap it in a ``` codeblock
This document is organized according to the websockets and data channels that are in use across the entire mischmasch system. Listed below are three websockets (names relative to app.js):
teapartyWebsocket
deltaWebsocket
localWebsocket
A 4th connection is a webRTC datachannel. Its signalling server is found in app.js (in host mode only), and is called p2pSignalBroker
; in the mischmasch clients, the datachannel is referred to as p2pDataChannel
- port 8090
- teapartyWebsocket server runs on teaparty.js, the heroku cloud app.
- app.js will connect to teaparty on startup. receives updated list of pals, host, and host ip.
- if first to connect, app.js is assigned host.
newClient
Sent from app.js to teaparty.
{
"username": "machineName",
"ip": "publicIPAddress",
"vr": 0,
"sound": 1,
"spectator": 0
}
guestlist
sent from teaparty to all app.js instances
{
"pals": {
"michaelpalumbo": {
"username": "michaelpalumbo",
"ip": "...omitted...",
"vr": 1,
"sound": 1,
"spectator": 0
}
},
"headcount": 1,
"host": "michaelpalumbo"
}
- port 8081
- this connects to other pals over the internet
- runs either as host or pal (determined by teaparty)
- handles the got
- port 8080
- communicates with other local clients (i.e. VR, max client)
vrClientStatus
sent from client.js to app.js
{
"cmd": "vrClientStatus",
"data": "1"
}
```audioClientStatus``` sent from max client to app.js
```json
{
"cmd": "audioClientStatus",
"data": "1"
}
#### Messages
## p2pWebsocket
(possibly not a websocket, also not yet a priority) p2p communication of non-edit data, i.e. controller/hmd data, across global system.
- runs on port 8082
- written using the node Pkg 'coven'