summaryrefslogtreecommitdiff
path: root/man/2
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-02-06 18:55:05 +0000
committerCharles.Forsyth <devnull@localhost>2007-02-06 18:55:05 +0000
commit3970097804db19b9eaa1a8f52a40d4ed75d11547 (patch)
tree74d9d38c9e54dd2ab64e3da6310167dabf142a14 /man/2
parentecc9caba0e344ed50c05ee8156b2734f4d76e463 (diff)
define replychan and replydirect
Diffstat (limited to 'man/2')
-rw-r--r--man/2/styxservers15
1 files changed, 12 insertions, 3 deletions
diff --git a/man/2/styxservers b/man/2/styxservers
index fca2748a..bf66283b 100644
--- a/man/2/styxservers
+++ b/man/2/styxservers
@@ -15,7 +15,7 @@ Styxserver: adt {
fd: ref Sys->FD; # file server end of connection
t: ref Navigator; # name space navigator for this server
msize: int; # negotiated Styx message size
-
+
new: fn(fd: ref Sys->FD, t: ref Navigator, rootpath: big)
:(chan of ref Tmsg, ref Styxserver);
reply: fn(srv: self ref Styxserver, m: ref Rmsg): int;
@@ -30,7 +30,10 @@ Styxserver: adt {
stat: fn(srv: self ref Styxserver, m: ref Tmsg.Stat);
default: fn(srv: self ref Styxserver, gm: ref Tmsg);
- # check validity
+ replychan: chan of ref Rmsg; # replies sent here if not nil.
+ replydirect: fn(srv: self ref Styxserver, gm: ref Rmsg): int; # called by receiver for replychan
+
+ # check validity
cancreate: fn(srv: self ref Styxserver, m: ref Tmsg.Create)
:(ref Fid, int, ref Sys->Dir, string);
canopen: fn(srv: self ref Styxserver, m: ref Tmsg.Open)
@@ -357,7 +360,13 @@ gives the Qid path of the root of the served name space.
.TP
.IB srv .reply(\fIm\fP)
Send a reply (R-message) to a client. The various utility methods,
-listed below, call this function to make their response.
+listed below, call this function to make their response. When
+.IB srv .replychan
+is not nil
+the function sends the R-message to this channel. It is assumed that a process
+will drain replies from it and call
+.IB srv .replydirect
+when appropriate.
.TP
.IB srv .attach(\fIm\fP)
Respond to an