2.2.4.3 Done and Attention Tokens

The DONE token (section 2.2.7.6) marks the end of the response for each executed SQL statement. Based on the SQL statement and the context in which it is executed, the server MAY generate a DONEPROC (section 2.2.7.8) or DONEINPROC (section 2.2.7.7) token instead.

The attention signal is sent by using the out-of-band write provided by the network library. An out-of-band write is the ability to send the attention signal no matter if the sender is in the middle of sending or processing a message or simply sitting idle. If that function is not supported, the client MUST simply read and discard all of the data, except SESSIONSTATE data (section 2.2.7.21), from the server until the final DONE token, which acknowledges that the attention signal is read.<8>