Blob


1 <head>
2 <title>flush(9P) - Plan 9 from User Space</title>
3 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
4 </head>
5 <body bgcolor=#ffffff>
6 <table border=0 cellpadding=0 cellspacing=0 width=100%>
7 <tr height=10><td>
8 <tr><td width=20><td>
9 <tr><td width=20><td><b>FLUSH(9P)</b><td align=right><b>FLUSH(9P)</b>
10 <tr><td width=20><td colspan=2>
11 <br>
12 <p><font size=+1><b>NAME </b></font><br>
14 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
16 flush &ndash; abort a message<br>
18 </table>
19 <p><font size=+1><b>SYNOPSIS </b></font><br>
21 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
23 <i>size</i>[4] <tt><font size=+1>Tflush</font></tt> <i>tag</i>[2] <i>oldtag</i>[2]<br>
24 <i>size</i>[4] <tt><font size=+1>Rflush</font></tt> <i>tag</i>[2]<br>
26 </table>
27 <p><font size=+1><b>DESCRIPTION </b></font><br>
29 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
31 When the response to a request is no longer needed, such as when
32 a user interrupts a process doing a <i>read</i>(9p), a <tt><font size=+1>Tflush</font></tt> request
33 is sent to the server to purge the pending response. The message
34 being flushed is identified by <i>oldtag</i>. The semantics of <tt><font size=+1>flush</font></tt>
35 depends on messages arriving in order.
36 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
38 The server should answer the <tt><font size=+1>flush</font></tt> message immediately. If it
39 recognizes <i>oldtag</i> as the tag of a pending transaction, it should
40 abort any pending response and discard that tag. In either case,
41 it should respond with an <tt><font size=+1>Rflush</font></tt> echoing the <i>tag</i> (not <i>oldtag</i>)
42 of the <tt><font size=+1>Tflush</font></tt> message. A <tt><font size=+1>Tflush</font></tt> can never be
43 responded to by an <tt><font size=+1>Rerror</font></tt> message.
44 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
46 The server may respond to the pending request before responding
47 to the <tt><font size=+1>Tflush</font></tt>. It is possible for a client to send multiple <tt><font size=+1>Tflush</font></tt>
48 messages for a particular pending request. Each subsequent <tt><font size=+1>Tflush</font></tt>
49 must contain as <i>oldtag</i> the tag of the pending request (not a previous
50 <tt><font size=+1>Tflush</font></tt>). Should multiple <tt><font size=+1>Tflush</font></tt>es be
51 received for a pending request, they must be answered in order.
52 A <tt><font size=+1>Rflush</font></tt> for any of the multiple <tt><font size=+1>Tflush</font></tt>es implies an answer for
53 all previous ones. Therefore, should a server receive a request
54 and then multiple flushes for that request, it need respond only
55 to the last flush.
56 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
58 When the client sends a <tt><font size=+1>Tflush</font></tt>, it must wait to receive the corresponding
59 <tt><font size=+1>Rflush</font></tt> before reusing <i>oldtag</i> for subsequent messages. If a response
60 to the flushed request is received before the <tt><font size=+1>Rflush</font></tt>, the client
61 must honor the response as if it had not been flushed, since the
62 completed request may signify a state
63 change in the server. For instance, <tt><font size=+1>Tcreate</font></tt> may have created a
64 file and <tt><font size=+1>Twalk</font></tt> may have allocated a fid. If no response is received
65 before the <tt><font size=+1>Rflush</font></tt>, the flushed transaction is considered to have
66 been canceled, and should be treated as though it had never been
67 sent.
68 <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
70 Several exceptional conditions are handled correctly by the above
71 specification: sending multiple flushes for a single tag, flushing
72 after a transaction is completed, flushing a <tt><font size=+1>Tflush</font></tt>, and flushing
73 an invalid tag.<br>
75 </table>
76 <p><font size=+1><b>ENTRY POINTS </b></font><br>
78 <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
80 The <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a> library does not generate <tt><font size=+1>flush</font></tt> transactions..
81 <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a> generates <tt><font size=+1>flush</font></tt> transactions to cancel transactions
82 pending when a client hangs up.<br>
84 </table>
86 <td width=20>
87 <tr height=20><td>
88 </table>
89 <!-- TRAILER -->
90 <table border=0 cellpadding=0 cellspacing=0 width=100%>
91 <tr height=15><td width=10><td><td width=10>
92 <tr><td><td>
93 <center>
94 <a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
95 </center>
96 </table>
97 <!-- TRAILER -->
98 </body></html>