Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
c541e437
Commit
c541e437
authored
Jul 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f0744a6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
wcfs/__init__.py
wcfs/__init__.py
+16
-0
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+0
-15
No files found.
wcfs/__init__.py
View file @
c541e437
...
...
@@ -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 ----
...
...
wcfs/wcfs_test.py
View file @
c541e437
...
...
@@ -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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment