*NOTE*
This proposal differs slightly from the original forum post (http://
www.ssforum.net/index.php?showtopic=20841).
- A new capability, "*sendto supported", was added
- The capabilities are assumed to be the same as Continuum's unless
the client sends a reply to "Query Client Version" or "Query Client
Capabilities"
Summary:
This proposal contains two client-to-server and two server-to-client
packets. These packets will allow the server to determine which client
is connected and whether that client supports some pre-defined
capabilities. In addition, the client has the option to notify the
server if its capabilities change at runtime (e.g. due to user
interaction).
Rationale:
As 3rd party development flourishes, we see an increasing number of
non-Continuum clients connecting to game servers. Since some clients
implement a subset of the full Continuum feature-set, it becomes
necessary for a server to take a different action if some feature is
missing.
With ASSS, it is also possible to write extensions that are not
compatible with the Continuum client. However, not all clients are
expected to be able to support all extensions. As before, if the
server can query the client's capabilities, it can fall-back to a
supported action in case a capability is not available.
Packets:
Direction: Server to Client
Packet Name: Query Client Version
Packet: 0x80
Direction: Client to Server
Packet Name: Client Version
Packet: 0x80 <client (4)> <clientVersion (4)> <displayName (asciiZ)>
client:
0 - Reserved
1 - Starlight
clientVersion: an application-specific version number. This number
must increase with every public client release.
displayName: a string that can be used by the server to display the
client name. Example: "Starlight 1.0"
Direction: Server to Client
Packet Name: Query Client Capabilities
Packet: 0x81
Direction: Client to Server
Packet Name: Client Capabilities
Packet: 0x81 <capFlags1 (1)> [capFlags2 (1) [capFlags3 (1) ... ]]
capFlags1:
bit 0 - Extended Continuum Chat Types
bit 1 - Supports *sendto
bit 2..7 - must be zero
Note: this is a variable-length packet with a maximum of 256 capFlags
bytes. The server must accept all packets smaller than 258 bytes and
will interpret only the flags it understands.
Usage:
The following rules determine when the above packets can be sent:
1) The server may send "Query Client Version" or "Query Client
Capabilities" at any time after a connection is established (i.e.
after 0x00 0x02 packet)
2) The client must send "Client Version" only in response to a "Query
Client Version" packet.
3) The client may only send "Client Capabilities" after receiving at
least one "Query Client Capabilities" packet.
4) The client may send "Client Capabilities" at any time after
receiving "Query Client Capabilities".
If the server sends a "Client Version" packet and receives no reply
AND the client does not reply to "Query Client Capabilities", the
server must assume the same capabilities as a full, Continuum-
compatible client. If the server receives a valid reply to the "Client
Version" packet OR the "Query Client Capabilities" packet, the
following rules apply:
If the server does not receive a single reply to "Query Client
Capabilities", it should assume no capabilities. If the server
receives at least one reply but no subsequent replies, it should
assume the capabilities of the last reply.