Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
SimTX Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
SimTX API v24/Packets/Handshake
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{SimTX API v24 navigation}} {{SimTX packet v24 | name = Handshake | id = β | direction = c2s | session = [[SimTX API v24/Connection and handshake|All roles]] | size = 12 bytes + credential | permission = None | reply = [[SimTX API v24/Packets/HandshakeResult|HandshakeResult]] | group = handshake }} 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 [[SimTX API v24/Game tickets|game ticket]]. Unlike every other packet, it has no packet ID byte. == Layout == {| class="wikitable" ! Field !! Type !! Description |- | <code>magic</code> || <code>i32</code> || Always <code>0x53494D54</code>, the ASCII bytes <code>SIMT</code>. |- | <code>version</code> || <code>i32</code> || Protocol version. Must be <code>24</code>. |- | <code>role</code> || <code>u8</code> || Session role. See [[#Roles|Roles]]. |- | <code>authKind</code> || <code>u8</code> || <code>0</code> = <code>ANONYMOUS</code>, <code>1</code> = <code>GAME_TICKET</code>. |- | <code>credential</code> || <code>UTF</code> || Empty for anonymous connections. Otherwise the <code>stx_gt1_</code> ticket. At most 512 characters, no control characters. |} == Roles == {| class="wikitable" ! Byte !! Role !! Authentication |- | 1 || <code>RECEIVER</code> || Anonymous, or ticket role <code>receiver</code> |- | 2 || <code>TX_AUDIO</code> || Ticket role <code>tx-audio</code> |- | 3 || <code>TX_GENERATED</code> || Ticket role <code>tx-generated</code> |- | 4 || <code>CONTROL</code> || Anonymous, or ticket role <code>control</code> |- | 5 || <code>MODERATION</code> || Ticket role <code>moderation</code> |- | 6 || <code>TIMESTAMPED_RECEIVER</code> || Anonymous only |} == Validation == * <code>authKind = 0</code> requires an empty credential; <code>authKind = 1</code> requires a non-blank one. * A wrong magic number, an unknown <code>authKind</code>, or an illegal credential (too long, control characters, or inconsistent with <code>authKind</code>) closes the connection '''without a reply'''. * A wrong version is answered with [[SimTX API v24/Packets/HandshakeResult|HandshakeResult]] status <code>VERSION_UNSUPPORTED</code>. * The handshake and the first session request must arrive within 5 seconds through the public gateway (15 seconds on a direct server). == Example == Transmitter handshake with a ticket (ticket shortened): <syntaxhighlight lang="text"> 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_β¦" </syntaxhighlight> == See also == * [[SimTX API v24/Connection and handshake]] * [[SimTX API v24/Game tickets]] {{SimTX API v24 navbox}} [[Category:SimTX API v24]]
Summary:
Please note that all contributions to SimTX Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SimTX Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:SimTX API v24 navbox
(
edit
)
Template:SimTX API v24 navigation
(
edit
)
Template:SimTX packet v24
(
edit
)