Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
nexedi
re6stnet
Commits
f9991e58
Commit
f9991e58
authored
Oct 09, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for writeable selectable objects
parent
3e207f4d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
7 deletions
+9
-7
re6st-registry
re6st-registry
+1
-1
re6st/registry.py
re6st/registry.py
+1
-1
re6st/tunnel.py
re6st/tunnel.py
+1
-1
re6st/upnpigd.py
re6st/upnpigd.py
+1
-1
re6st/utils.py
re6st/utils.py
+4
-2
re6stnet
re6stnet
+1
-1
No files found.
re6st-registry
View file @
f9991e58
...
...
@@ -102,7 +102,7 @@ def main():
server_dict
[
r
.
fileno
()]
=
r
.
_handle_request_noblock
if
server_dict
:
while
True
:
args
=
server_dict
.
copy
(),
[]
args
=
server_dict
.
copy
(),
{},
[]
server
.
select
(
*
args
)
utils
.
select
(
*
args
)
...
...
re6st/registry.py
View file @
f9991e58
...
...
@@ -90,7 +90,7 @@ class RegistryServer(object):
self
.
email
=
self
.
ca
.
get_subject
().
emailAddress
self
.
onTimeout
()
def
select
(
self
,
r
,
t
):
def
select
(
self
,
r
,
w
,
t
):
if
self
.
timeout
:
t
.
append
((
self
.
timeout
,
self
.
onTimeout
))
...
...
re6st/tunnel.py
View file @
f9991e58
...
...
@@ -186,7 +186,7 @@ class TunnelManager(object):
self
.
_free_iface_list
.
append
(
iface
)
del
self
.
_iface_to_prefix
[
iface
]
def
select
(
self
,
r
,
t
):
def
select
(
self
,
r
,
w
,
t
):
r
[
self
.
_read_pipe
]
=
self
.
handleTunnelEvent
r
[
self
.
sock
]
=
self
.
handlePeerEvent
t
.
append
((
self
.
_next_refresh
,
self
.
refresh
))
...
...
re6st/upnpigd.py
View file @
f9991e58
...
...
@@ -28,7 +28,7 @@ class Forwarder(object):
raise
UPnPException
(
str
(
e
))
return
wraps
(
wrapped
)(
wrapper
)
def
select
(
self
,
r
,
t
):
def
select
(
self
,
r
,
w
,
t
):
t
.
append
((
self
.
next_refresh
,
self
.
refresh
))
def
checkExternalIp
(
self
,
ip
=
None
):
...
...
re6st/utils.py
View file @
f9991e58
...
...
@@ -165,9 +165,9 @@ class Popen(subprocess.Popen):
return
r
def
select
(
R
,
T
):
def
select
(
R
,
W
,
T
):
try
:
r
,
w
,
_
=
_select
.
select
(
R
,
()
,
(),
r
,
w
,
_
=
_select
.
select
(
R
,
W
,
(),
max
(
0
,
min
(
T
)[
0
]
-
time
.
time
())
if
T
else
None
)
except
_select
.
error
as
e
:
if
e
.
args
[
0
]
!=
errno
.
EINTR
:
...
...
@@ -175,6 +175,8 @@ def select(R, T):
return
for
r
in
r
:
R
[
r
]()
for
w
in
w
:
W
[
w
]()
t
=
time
.
time
()
for
next_refresh
,
refresh
in
T
:
if
next_refresh
<=
t
:
...
...
re6stnet
View file @
f9991e58
...
...
@@ -425,7 +425,7 @@ def main():
raise
ReexecException
(
"Restart to renew certificate"
)
select_list
.
append
(
utils
.
select
)
while
True
:
args
=
{},
[(
next_renew
,
renew
)]
args
=
{},
{},
[(
next_renew
,
renew
)]
for
s
in
select_list
:
s
(
*
args
)
finally
:
...
...
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