summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python-client/tcprelay.py2
-rw-r--r--python-client/usbmux.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/python-client/tcprelay.py b/python-client/tcprelay.py
index 3075fcb..c49d708 100644
--- a/python-client/tcprelay.py
+++ b/python-client/tcprelay.py
@@ -68,7 +68,7 @@ class SocketRelay(object):
class TCPRelay(SocketServer.BaseRequestHandler):
def handle(self):
print "Incoming connection to %d"%self.server.server_address[1]
- mux = usbmux.USBMux("/tmp/usbmuxd")
+ mux = usbmux.USBMux()
print "Waiting for devices..."
if not mux.devices:
mux.process(1.0)
diff --git a/python-client/usbmux.py b/python-client/usbmux.py
index 172f326..8b0270d 100644
--- a/python-client/usbmux.py
+++ b/python-client/usbmux.py
@@ -209,7 +209,12 @@ class MuxConnection(object):
self.socket.sock.close()
class USBMux(object):
- def __init__(self, socketpath="/tmp/usbmuxd"):
+ def __init__(self, socketpath=None):
+ if socketpath is None:
+ if sys.platform == 'darwin':
+ socketpath = "/var/run/usbmuxd"
+ else:
+ socketpath = "/tmp/usbmuxd"
self.socketpath = socketpath
self.listener = MuxConnection(socketpath, BinaryProtocol)
try: