UNSUBSCRIBE
The UNSUBSCRIBE packet is used to tell the server that you are no longer interested in updates of a specific bucket
Request
Figure A: UNSUBSCRIBE request byte-map (header and body)
The UNSUBSCRIBE request (see Figure A) includes a header. This header contains one field: the bucket id which indicates the bucket unsubscribe from.
The SUBSCRIBE packet has no body and does not accept any extra flags.
Response
Figure B: UNSUBSCRIBE response byte-map
The UNSUBSCRIBE request does not return any data.
You may encounter the following error codes:
- 4 (authentication failed): Authentication for this bucket failed (bucket key missing or invalid)
- 21 (bucket does not exist): The requested bucket is not found
Process and flow
Figure C: UNSUBSCRIBE process flow
The UNSUBSCRIBE process (see Figure C) goes as follows:
- The client sends a UNSUBSCRIBE packet to the server
- The server checks if the user is subscribed. If so, it removes the subscription.
- The server sends an empty response.
← Back to Home - To Transport - Prev: SUBSCRIBE packet →