.TH FLUSH 5
.SH NAME
flush \- abort a message
.SH SYNOPSIS
.ta \w'\fLTflush 'u
.B
Tflush	
.IR tag [2]
.IR oldtag [2]
.br
.B
Rflush	
.IR tag [2]
.PP
.SH DESCRIPTION
When the response to a request is no longer needed, such as when
a user interrupts a process doing a
.IR read (2),
a
.B Tflush
request is sent to the server to purge the pending response.
The message being flushed is identified by
.IR oldtag .
The semantics of
.B flush
depends on messages arriving in order.
.PP
The server must answer the
.B flush
message immediately.
If it recognizes
.I oldtag
as the tag of a pending transaction, it should abort any pending response
and discard that tag.
In either case, it should respond with an
.B Rflush
echoing the tag (not
.IR oldtag )
of the
.B Tflush
message.
A
.B Tflush
can never be responded to by an
.B Rerror
message.
.PP
When the client sends a 
.BR Tflush ,
it must wait to receive the corresponding
.B Rflush
before reusing
.I oldtag
for subsequent messages.
If a response to the flushed request is received before the
.BR Rflush ,
the transaction is considered to have finished,
and should be treated as though it had not been flushed.
If no response is received before the 
.BR Rflush ,
the flushed transaction is considered to have been canceled,
and should be treated as though it had never been sent.
.PP
Several exceptional conditions are handled correctly by the above specification:
sending multiple flushes for a single tag,
flushing a
.BR Tflush ,
and flushing an invalid tag.
