search for services given the TYPES and SCOPES within a given TIMEOUT
(self, types=None, scopes=None, address=None, port=None,
timeout=DEFAULT_DISCOVERY_TIMEOUT)
| 120 | self._remoteServices.clear() |
| 121 | |
| 122 | def searchServices(self, types=None, scopes=None, address=None, port=None, |
| 123 | timeout=DEFAULT_DISCOVERY_TIMEOUT): |
| 124 | 'search for services given the TYPES and SCOPES within a given TIMEOUT' |
| 125 | try: |
| 126 | self._sendProbe(types, scopes, address, port) |
| 127 | except: |
| 128 | raise Exception("Server not started") |
| 129 | |
| 130 | time.sleep(timeout) |
| 131 | |
| 132 | return filterServices(list(self._remoteServices.values()), types, scopes) |
| 133 | |
| 134 | def stop(self): |
| 135 | self.clearRemoteServices() |