internals:sbl-websocket-messages
This is an old revision of the document!
Table of Contents
SBL Websocket Messages
A message always starts with a 4-byte Big Endian integer denoting the a message counter, which starts at 0 and runs per connection, not per room/server. Counters are seperate for client and server messages.
After that counter, data is serialized in the the MsgPack format. Messages contain multiple concatenated MsgPack values. Unpack objects one by one and refer to the table below for what they represent.
Value | Type | Description |
---|---|---|
Message Type | Integer | 2 (Request), 3 (Reply), 4 (Updates), 5 (???) or 6 (???). |
Function ID | Integer | For Types 2 (Request), 3 (Reply) and 4 (Updates) only. Defines the Payload for the message. See below. |
Error Code (?) | Integer | For Type 3 (Reply) only. 0 if the Request was successful. See below. |
Payload | Any | A data structure corresponding to the message's Function. See below. |
Acknowledgement (?) | String | For Type 3 (Reply) only. Always “OK”? |
Flow
Requests
253: Broadcast
Sends a message with a given type/function to all players in the room (including the sender themselves). There is no reply.
Payload: Map | |||
---|---|---|---|
Key | Description | Type | Content |
244 | Broadcast Function | Integer | The Function the broadcast will have. |
245 | Broadcast Payload | Any | The Payload the broadcast will have. |
246 | ??? | Integer | ??? Always 1. |
247 | Broadcast Message Type | Integer | The Message Type the broadcast will have. |
See the relevant section for a Broadcast Function to see what the Payload should be.
Replies
Updates
200: Stamp Broadcast Received
Payload: Map | |||||||||
---|---|---|---|---|---|---|---|---|---|
Key | Description | Type | Content | ||||||
245 | Broadcast Payload | Map | |||||||
Key | Description | Type | Content | ||||||
0 | ??? | Integer | ??? Always 1. | ||||||
1 | ??? | Integer | ??? Always 0. | ||||||
2 | ??? | Integer | ??? Unknown number. | ||||||
4 | Stamp Info | Byte Array | MsgPack-ed 2-element array that must be unpacked seperately. | ||||||
Index | Type | Content | |||||||
0 | Integer | Friend ID of the sender. | |||||||
1 | Integer | Stamp ID (same order as in the in-game menu, 1-indexed). | |||||||
5 | ??? | Integer | ??? Always 1. | ||||||
254 | Broadcast Sender | Integer | In-Room User ID of the sender. |
Error Codes
Code | Name | Description |
---|---|---|
0 | None | No error. |
1 | NoRandomMatchFound | There are no rooms matching the search criteria. |
2 | RoomClosed | The room has been closed. |
3 | RoomMemberOver | The room is full. |
4 | ShortageMember | The SBLSBL: Short for "SIFAS Big Live". A monthly co-op event where 20 players go for Group Goals and fight for MVP Titles.➔ Learn More is supposed to start, but there are not enough players (at least half the room limit), so the SBL has been cancelled and the room will be closed. |
5 | OutOfDate | ??? |
6 | Unknown | ??? |
Contributors to this page:
internals/sbl-websocket-messages.1656720062.txt.gz · Last modified: 2022/07/02 00:01 by Suyooo