X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=apt_p2p%2F__init__.py;h=8ef0daef5f47306dc7ab33ab4dbdaf2f48ceefa0;hb=dbcab5189211e7e072c6477d651d578509cd0e0b;hp=356924f083b6cb9652d7d8fc322a506588b14c4b;hpb=a4d25dfe9500adbd16f3dd570ad6f3cf32e2775e;p=quix0rs-apt-p2p.git diff --git a/apt_p2p/__init__.py b/apt_p2p/__init__.py index 356924f..8ef0dae 100644 --- a/apt_p2p/__init__.py +++ b/apt_p2p/__init__.py @@ -4,30 +4,31 @@ To run apt-p2p, you probably want to do something like:: from apt_p2p.apt_p2p import AptP2P - myapp = AptP2P(myDHT) + factory = AptP2P(DHT) -where myDHT is a DHT that implements interfaces.IDHT. +where DHT is a class that implements interfaces.IDHT. Diagram of the interaction between the given modules:: +---------------+ +-----------------------------------+ +------------- - | AptP2P | | DHT | | Internet + | AptP2P | | DHT | | | |--->|join DHT|----|--\ | |--->|loadConfig | | | Another | |--->|getValue | | | Node | |--->|storeValue DHT|<---|--/ | |--->|leave | | - | | +-----------------------------------+ | - | | +-------------+ +----------------+ | - | | | PeerManager | | HTTPDownloader*| | - | |--->|get |--->|get HTTP|----|---> Mirror - | | | |--->|getRange | | - | |--->|close |--->|close HTTP|----|--\ - | | +-------------+ +----------------+ | | Another - | | +-----------------------------------+ | | Peer - | | | HTTPServer HTTP|<---|--/ - | |--->|getHTTPFactory | +------------- - |check_freshness|<---| | +------------- + | /-----|--->|getStats | | + | | | +-----------------------------------+ | Internet + | | | +-------------+ +----------------+ | + | | | | PeerManager | | HTTPDownloader*| | + | | |--->|get |--->|get HTTP|----|---> Mirror + | | | | |--->|getRange | | + | | |--->|close |--->|close HTTP|----|--\ + | | | +-------------+ +----------------+ | | Another + | | | +-----------------------------------+ | | Peer + | | | | HTTPServer HTTP|<---|--/ + | | | | | +------------- + | getStats|<---| | +------------- | get_resp|<---| HTTP|<---|HTTP Request | | +-----------------------------------+ | | | +---------------+ +--------------+ | Local Net