(self, address)
| 267 | print(json.dumps(result, indent=4)) |
| 268 | |
| 269 | def siteAnnounce(self, address): |
| 270 | from Site.Site import Site |
| 271 | from Site import SiteManager |
| 272 | SiteManager.site_manager.load() |
| 273 | |
| 274 | logging.info("Opening a simple connection server") |
| 275 | global file_server |
| 276 | from File import FileServer |
| 277 | file_server = FileServer("127.0.0.1", 1234) |
| 278 | file_server.start() |
| 279 | |
| 280 | logging.info("Announcing site %s to tracker..." % address) |
| 281 | site = Site(address) |
| 282 | |
| 283 | s = time.time() |
| 284 | site.announce() |
| 285 | print("Response time: %.3fs" % (time.time() - s)) |
| 286 | print(site.peers) |
| 287 | |
| 288 | def siteDownload(self, address): |
| 289 | from Site.Site import Site |
nothing calls this directly
no test coverage detected