From cf6a1711f4bae6712074af06be9401c37ed883c0 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Tue, 28 Aug 2012 12:39:21 +0200 Subject: [PATCH] Add some explanatory comments to the list of ports --- src/calibre/devices/smart_device_app/driver.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 8b4ebb1881..bbbf5d9e0e 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -89,6 +89,14 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): DISCONNECT_AFTER_N_SECONDS = 30*60 # 30 minutes ZEROCONF_CLIENT_STRING = b'calibre smart device client' + + # A few "random" port numbers to use for detecting clients using broadcast + # The clients are expected to broadcast a UDP 'hi there' on all of these + # ports when they attempt to connect. Calibre will respond with the port + # number the client should use. This scheme backs up mdns. And yes, we + # must hope that no other application on the machine is using one of these + # ports in datagram mode. + # If you change the ports here, all clients will also need to change. BROADCAST_PORTS = [54982, 48123, 39001, 44044, 59678] opcodes = {