Package message defines the supported types of messages in the juggler protocol.
The juggler.0 protocol defines the following messages for the client:
- CALL : to call an RPC function - SUB : to subscribe to a pub-sub channel - UNSB : to unsubscribe from a pub-sub channel - PUB : to publish to a pub-sub channel
And the following messages for the server:
- ACK : successful CALL (but no result yet), SUB, UNSB or PUB - NACK : failed CALL, SUB, UNSB or PUB - RES : the result of a CALL message - EVNT : an event triggered on a channel that the client is subscribed to
All messages must be of type websocket.TextMessage. Failing to properly speak the protocol terminates the connection without notice from the peer. That includes sending binary messages and sending unknown (or invalid for the peer) message types.