summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/signaler.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-02-23 11:54:16 -0400
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-02-23 15:34:36 -0300
commite3ddc783ca9fb21105845d275a4b38ad6b2cd3e2 (patch)
treee65c35d3c065459e38f1b89d3a3cdb804a78bb37 /src/leap/bitmask/backend/signaler.py
parent00b8cbaa31d48326b36928228269ac14276fd5ee (diff)
Use unix sockets for the fallback, and set permissions
... on them, to user-writeable only. I think we could consider ipc for the curve-case too, at least for the platforms that support them.
Diffstat (limited to 'src/leap/bitmask/backend/signaler.py')
-rw-r--r--src/leap/bitmask/backend/signaler.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/bitmask/backend/signaler.py b/src/leap/bitmask/backend/signaler.py
index a8498d11..aec2f606 100644
--- a/src/leap/bitmask/backend/signaler.py
+++ b/src/leap/bitmask/backend/signaler.py
@@ -37,8 +37,11 @@ class Signaler(object):
Signaler client.
Receives signals from the backend and sends to the signaling server.
"""
- PORT = "5667"
- SERVER = "tcp://localhost:%s" % PORT
+ if flags.ZMQ_HAS_CURVE:
+ PORT = "5667"
+ SERVER = "tcp://localhost:%s" % PORT
+ else:
+ SERVER = "ipc:///tmp/bitmask.socket.1"
POLL_TIMEOUT = 2000 # ms
POLL_TRIES = 500