2.2.4 Packet Data Token and Tokenless Data Streams
The messages contained in packet data that pass between the client and the server can be one of two types: a token stream or a tokenless stream. A token stream consists of one or more tokens, each followed by some token-specific data. A token is a 1-byte identifier used to describe the data that follows it (for example, it contains token data type, token data length, and so on). Tokenless streams are typically used for simple messages. Messages that require a more detailed description of the data within them are sent as a token stream. The following table highlights which messages, as described in sections 2.2.1 and 2.2.2, use token streams and which do not.
Message type |
Client or server message |
Token stream used |
---|---|---|
Pre-login |
Client |
No |
Login |
Client |
No |
SQL batch |
Client |
No |
Bulk load |
Client |
Yes |
RPC |
Client |
Yes |
Attention |
Client |
No |
Transaction manager request |
Client |
No |
Login response |
Server |
Yes |
Row data |
Server |
Yes |
Return status |
Server |
Yes |
Return parameters |
Server |
Yes |
Response completion (DONE) |
Server |
Yes |
Error and info messages |
Server |
Yes |
Attention acknowledgement |
Server |
No |