1
0
Fork 0

Fix communication over unix socket

This commit is contained in:
nemunaire 2017-06-23 20:41:57 +02:00 committed by Pierre-Olivier Mercier
parent 35e0890563
commit ac0cf729f1
1 changed files with 7 additions and 1 deletions

View File

@ -125,9 +125,15 @@ class UnixSocket:
super().connect(self._socket_path)
class SocketClient(_Socket, socket.socket):
def read(self):
return self.recv()
class _Listener:
def __init__(self, new_server_cb, instanciate=_Socket, **kwargs):
def __init__(self, new_server_cb, instanciate=SocketClient, **kwargs):
super().__init__(**kwargs)
self._instanciate = instanciate