SimTX API/Packets/ListStations: Difference between revisions
Appearance
Protocol v25 reference: ListStations Tag: Removed redirect |
Remove development history and server internals |
||
| Line 36: | Line 36: | ||
== Example == | == Example == | ||
Complete frames, including the varint length prefix | Complete frames, including the varint length prefix. | ||
'''<code>list_stations</code>''' (client to server, 8 bytes): | '''<code>list_stations</code>''' (client to server, 8 bytes): | ||
Latest revision as of 17:16, 24 October 2026
| Frame | ClientFrame, field 30
|
|---|---|
| Member | list_stations
|
| Direction | Client → server |
| Session | Control, moderation |
| Roles | ROLE_CONTROL, ROLE_MODERATION.
|
| Permission | None on control sessions; moderation.manage on moderation sessions
|
| Answered by | StationList (moderation: then StationImpactList) |
| Defined in | control.proto
|
ListStations asks for the list of stations on the server. The server answers with StationList. On a moderation session the list includes client addresses and is followed by StationImpactList.
Definition[edit | edit source]
message ListStations {
int64 request_id = 1;
bool include_sessions = 2;
}
Fields[edit | edit source]
| # | Field | Type | Description |
|---|---|---|---|
| 1 | request_id |
int64 |
Nonzero; echoed in the StationList. |
| 2 | include_sessions |
bool |
Ignored by current servers, which always list live sessions. Send true.
|
Rate limiting[edit | edit source]
ListStations is a heavy request. Poll it every few seconds at most; the per-address heavy budget is 4 per second, shared by all control connections from the address.
Example[edit | edit source]
Complete frames, including the varint length prefix.
list_stations (client to server, 8 bytes):
07 frame length 7
F2 01 04 list_stations (ListStations), 4 bytes
08 05 request_id = 5
10 01 include_sessions = true