Railgun

if it ain't broke, we'll break it

User Tools

Site Tools


sockchat:c2s:client-info

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sockchat:c2s:client-info [2025/04/19 23:53] flashsockchat:c2s:client-info [2025/04/20 02:04] (current) flash
Line 1: Line 1:
 ====== C2S Packet 3: Client Info ====== ====== C2S Packet 3: Client Info ======
 +
 +**//THIS IS A DRAFT AND SHOULD NOT YET BE IMPLEMENTED//**
  
 Informs the server about the name, version and capabilities of the client. Informs the server about the name, version and capabilities of the client.
 This packet can optionally be sent before [[sockchat:c2s:authz-attempt|C2S Packet 1: Authorization Attempt]] to extend functionality of the protocol. This packet can optionally be sent before [[sockchat:c2s:authz-attempt|C2S Packet 1: Authorization Attempt]] to extend functionality of the protocol.
 Sending this packet is optional, leaving it out will have the protocol behave as it originally did without extensions, it can also be sent with an empty capabilities field. Sending this packet is optional, leaving it out will have the protocol behave as it originally did without extensions, it can also be sent with an empty capabilities field.
 +
 +If sent and the server supports this packet, it will respond with [[sockchat:s2c:server-info|S2C Packet 11: Server Info]], informing the client of its name and version as well as whatever capabilities sent by the client that are supported.
 +If after a certain threshold the server does not respond, it should be assumed that the server does not understand the Client/Server Info packets.
 +The client should then continue operating as an unmodified original client by sending the authorization attempt packet mentioned earlier.
 +
 +If after the timeout or after receiving the Server Info packet, the client is not satisfied with the supported capabilities, it may terminate the connection.
 +
 +The format of the client identification string is entirely up to the developer of the client and is not used for capability checking, similar to the [[https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent|HTTP User-Agent header]].
  
 ===== Format ===== ===== Format =====
Line 9: Line 19:
 ^ Index ^ Type ^ Description ^ ^ Index ^ Type ^ Description ^
 |  0 |  ''%%3%%''  | Client Info packet ID | |  0 |  ''%%3%%''  | Client Info packet ID |
-|  1 |  [[sockchat:types#string|string]]  | Client software name +|  1 |  [[sockchat:types#string|string]]  | Client identification 
-|  2 |  [[sockchat:types#string|string]]  | Client software version |+|  2 |  [[sockchat:types#collection|collection]]  | Capabilities supported by the client | 
 + 
 +===== Examples ===== 
 + 
 +==== No capabilities specified ==== 
 + 
 +Client identifies itself but does not specify any capabilities. Notice that the trailing ''%%\t%%'' is still present as index 2 is still required to be there. 
 + 
 +  3\tKuroko/fbcdbdb9e8\t 
 + 
 +If the server doesn't understand this packet, it will not respond with anything. 
 +If it does understand, the server will respond with something akin to the following. 
 + 
 +  11\tMikoto/1.0\t 
 + 
 +==== Capabilities specified ==== 
 + 
 +Client identifies itself as supporting hypothetical capabilities ''%%x-uppercase-everything%%'' and ''%%nohtml%%''
 + 
 +  3\tSatori/20241018\tx-uppercase-everything\fnohtml 
 + 
 +If the server doesn't understand this packet, it will not respond with anything. 
 +In this scenario the server does understand the client/server info packets, but only supports ''%%nohtml%%'' out of the supplied capabilities. 
 + 
 +  11\tSharpChat/3c8bb88d53\tnohtml 
 + 
 +===== See Also ===== 
 + 
 +  * [[sockchat:s2c:server-info|S2C Packet 11: Server Info]] - Response to this packet. 
 +  * [[sockchat:capabilities|Capabilities]] - List of capabilities. 
sockchat/c2s/client-info.1745106825.txt.gz · Last modified: 2025/04/19 23:53 by flash