Jump to content

SimTX API v24/Packets/Handshake

From SimTX Wiki
This page documents protocol v24, which current servers no longer accept. See SimTX API for v25.
Handshake
Packet ID —
Direction Client → server
Session All roles
Body size 12 bytes + credential
Permission None
Answered by HandshakeResult
Answers

The Handshake is the first data a client sends on a new connection, immediately after the TLS handshake. It identifies the protocol, states the protocol version, selects the session role, and optionally carries a game ticket. Unlike every other packet, it has no packet ID byte.

Layout[edit | edit source]

Field Type Description
magic i32 Always 0x53494D54, the ASCII bytes SIMT.
version i32 Protocol version. Must be 24.
role u8 Session role. See Roles.
authKind u8 0 = ANONYMOUS, 1 = GAME_TICKET.
credential UTF Empty for anonymous connections. Otherwise the stx_gt1_ ticket. At most 512 characters, no control characters.

Roles[edit | edit source]

Byte Role Authentication
1 RECEIVER Anonymous, or ticket role receiver
2 TX_AUDIO Ticket role tx-audio
3 TX_GENERATED Ticket role tx-generated
4 CONTROL Anonymous, or ticket role control
5 MODERATION Ticket role moderation
6 TIMESTAMPED_RECEIVER Anonymous only

Validation[edit | edit source]

  • authKind = 0 requires an empty credential; authKind = 1 requires a non-blank one.
  • A wrong magic number, an unknown authKind, or an illegal credential (too long, control characters, or inconsistent with authKind) closes the connection without a reply.
  • A wrong version is answered with HandshakeResult status VERSION_UNSUPPORTED.
  • The handshake and the first session request must arrive within 5 seconds through the public gateway (15 seconds on a direct server).

Example[edit | edit source]

Transmitter handshake with a ticket (ticket shortened):

53 49 4D 54           magic       "SIMT"
00 00 00 18           version     24
02                    role        TX_AUDIO
01                    authKind    GAME_TICKET
00 48                 credential  length 72
73 74 78 5F 67 74 31 5F …         "stx_gt1_…"

See also[edit | edit source]

SimTX API v24 reference (protocol v24, archived)
Start OverviewQuick startData typesLimits and errorsPacket list
Account service OverviewDevice loginServer directoryGame ticketsPermissionsPublic endpoints
Game protocol Connection and handshakeReceiver sessionTransmitter sessionControl sessionCatalogModeration
Handshake HandshakeHandshakeResult
Receiver ReceiverSessionRequestReceiverRetuneForwardedClientAddressIqStreamDescriptorIqBlockTimedIqBlock
Transmitter TransmitterSessionRequestSampleBlockTxModeInfoTxUpdateTxQueueTxAcceptTxRejectTxKickTxTelemetryTxUpdateAck
Control ControlAckBannerListStationsStationListServerHealthRequestServerHealthReportCoverageMapRequestCoverageMapResponseWeatherMapRequestWeatherMapResponseStartMonitorStopMonitorMonitorBlockMonitorEnd
Catalog CatalogListRequestCatalogListCatalogFetchCatalogEntryCatalogUploadCatalogUploadResultCatalogDeleteCatalogDeleteResult
Moderation KickRequestKickResultIpModerationRequestIpModerationResultBroadcastBannerModerationErrorStationImpactList
Current Protocol v25 reference