Commit c541e437 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f0744a6c
......@@ -221,6 +221,22 @@ class WatchLink(object):
if _ == 0:
raise ctx.err()
# _send sends raw message via specified stream.
#
# multiple _send can be called in parallel - _send serializes writes.
# XXX +ctx?
def _send(wlink, stream, msg):
assert '\n' not in msg
pkt = b"%d %s\n" % (stream, msg)
wlink._write(pkt)
def _write(wlink, pkt):
with wlink._txmu:
#print('C: watch : tx: %r' % pkt)
wlink._wtx.write(pkt)
wlink._wtx.flush()
# ---- WCFS raw file access ----
......
......@@ -735,21 +735,6 @@ class tWatchLink(wcfs.WatchLink):
# ---- message IO ----
# _send sends raw message via specified stream.
#
# multiple _send can be called in parallel - _send serializes writes.
# XXX +ctx?
def _send(t, stream, msg):
assert '\n' not in msg
pkt = b"%d %s\n" % (stream, msg)
t._write(pkt)
def _write(t, pkt):
with t._txmu:
#print('C: watch : tx: %r' % pkt)
t._wtx.write(pkt)
t._wtx.flush()
# sendReq sends client -> server request and returns server reply.
#
# only 1 sendReq must be used at a time. # XXX relax?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment