Action | Example message in json |
---|---|
subscribe to the channel room1 | { "type": "SUBSCRIBE", "payload": "room1"} |
unsubscribe from the channel room1 | { "type": "UNSUBSCRIBE", "payload": "room1"} |
answer on ping message | { "type": "PONG", "payload": "PONG"} |
Action | Example message in json |
---|---|
Subscribe result | { "type": "RESPONSE_SUBSCRIBE", "payload": "SUBSCRIBE_OK(room1)", code: 200} |
Subscribe result (access denied) | { "type": "RESPONSE_SUBSCRIBE", "payload": "SUBSCRIBE_ACCESS_DENIED(room1)", code: 403} |
Unsubscrube result | { "type": "RESPONSE_UNSUBSCRIBE", "payload": "UNSUBSCRIBE_OK(room1)", code: 200} |
Receiving data | { "type": "DATA", "payload": "message text or json", code: 200} |
Disconnect | { "type": "DISCONNECT", "payload": "DISCONNECT", code: 200} |
Ping (check connection, you should answer PONG) | { "type": "PING", "payload": "PING", code: 200} |
docker-compose up -d
./gradlew :demo_ws_push_executor:bootRun
./gradlew :demo_ws_public_executor:bootRun
run net/alfss/demowsclient/DemoPushClientMain.kt
run net/alfss/demowsclient/DemoWsClientMain.kt