From ea60f41fcc2e0b723aef6afecb67bfc16294e76c Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 6 Sep 2018 23:54:56 +0200 Subject: [PATCH] add comment --- src/fenrirscreenreader/core/remoteManager.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/fenrirscreenreader/core/remoteManager.py b/src/fenrirscreenreader/core/remoteManager.py index 5ac38cbb..ae1c00df 100644 --- a/src/fenrirscreenreader/core/remoteManager.py +++ b/src/fenrirscreenreader/core/remoteManager.py @@ -51,10 +51,15 @@ class remoteManager(): self.sock = None def unixSocketWatchDog(self, active, eventQueue): # echo "#<=>#command##exec#say##this is a test" | socat - UNIX-CLIENT:/tmp/fenrir-deamon.sock - if os.path.exists("/tmp/fenrir-deamon.sock"): - os.remove("/tmp/fenrir-deamon.sock") + # socket daemon + # /run/user//fenrirscreenreader/daemon + # socket pty + # /run/user//fenrirscreenreader/ptyX + socketpath = '/tmp/fenrir-deamon.sock' + if os.path.exists(socketpath): + os.remove(socketpath) self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - self.sock.bind("/tmp/fenrir-deamon.sock") + self.sock.bind(socketpath) self.sock.listen(1) while active.value == 1: client_sock, client_addr = self.sock.accept() @@ -80,6 +85,7 @@ class remoteManager(): self.sock = None def tcpWatchDog(self, active, eventQueue): # echo "#<=>#command##exec#say##this is a test" | nc localhost 22447 + # port should be configureable self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.host = '0.0.0.0'