docs: def getPort(self):
          """
          Helper method for testing; returns the TCP port used for this
          registration, even if it was specified as 0 and thus allocated by the
          OS.
          """
          disp = self.pbmanager.dispatchers[self.portstr]
          return disp.port.getHost().port