Partager via


2.2.1.7 Attention

The client can interrupt and cancel the current request by sending an Attention message. This is also known as out-of-band data, but any TDS packet that is being sent MUST be finished before sending the Attention message. After the client sends an Attention message, the client MUST read until it receives an Attention acknowledgment.

If a complete request has been sent to the server, sending a cancel requires sending an Attention packet. An example of this behavior is if the client has already sent a request, which has the last packet with EOM bit (0x01) set in status. The Attention packet is the only way to interrupt a complete request that has already been sent to the server. For more information, see section 4.19.2.

If a complete request has not been sent to the server, the client MUST send the next packet with both the ignore bit (0x02) and EOM bit (0x01) set in the status to cancel the request. An example of this behavior is if one or more packets have been sent but the last packet with EOM bit (0x01) set in status has not been sent. Setting the ignore and EOM bits terminates the current request, and the server MUST ignore the current request. When the ignore and EOM bits are set, the server does not send an attention acknowledgment, but instead returns a table response with a single DONE token (section 2.2.7.6) that has a status of DONE_ERROR to indicate that the incoming request was ignored. For more details about the packet header status code, see section 2.2.3.1.2.