open-pwa / open-pwa

ServiceWorker Deployments as a Platform providing the needed API's for Kubernetes, MesOs, Borg, Android. IOS, Mac, Windows, Linux. Manage Deployments of any kind as ServiceWorkers.
Apache License 2.0
25 stars 1 forks source link

open-pwa event protocol #39

Open frank-dspeed opened 3 years ago

frank-dspeed commented 3 years ago

event: userconnect data: {"username": "bobby", "time": "02:33:48"}

data: Here's a system message of some kind that will get used data: to accomplish some task.

event: usermessage data: {"username": "bobby", "time": "02:34:11", "text": "Hi everyone."}

each seperated by \n new line

data without event gets recived via onmessage and the rest via addEventListner.

the data is always a Stream of UTF-8 Char Data.