Skip to content

Namespace

Michael Palumbo edited this page Jun 23, 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 4 websockets that are in use across the entire mischmasch system. Listed below (names relative to app.js):

  1. teapartyWebsocket
  2. deltaWebsocket
  3. localWebsocket
  4. p2pWebsocket

teapartyWebsocket

  • port 8090
  • 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.

Messages

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"
}

deltaWebsocket

  • port 8081
  • this connects to other pals over the internet
  • runs either as host or pal (determined by teaparty)
  • handles the got

Messages

localWebsocket

  • 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. 
Clone this wiki locally