This is a re-coded Version of our ChatClient, which has a much better structure than the old one.
Login:
{"typ": "login", "username": "basti", "password": "123"}
Logout:
{"typ": "logout", "username": "basti"}
Add Group:
{"typ": "addGroup", "group": "Schule"}
Join Group:
{"typ": "joinGroup", "group": "Schule"}
Message:
{"typ": "data", "group": "Schule", "payload": "Hallo"}
Get Groups:
{"typ":"groups"}
Just clone ;)