X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=apt_dht%2FHTTPServer.py;fp=apt_dht%2FHTTPServer.py;h=5c6904f764c9b016c357e7bca7d9ca2918f886f6;hb=1cc5dbfba72210e141be6743a334403d68cbcb40;hp=4d62e5b0ee4602a88ba58a0b2c650c3aca03cd55;hpb=5f71361ea619c97e77b9c5cd52894d2088d19b08;p=quix0rs-apt-p2p.git diff --git a/apt_dht/HTTPServer.py b/apt_dht/HTTPServer.py index 4d62e5b..5c6904f 100644 --- a/apt_dht/HTTPServer.py +++ b/apt_dht/HTTPServer.py @@ -43,7 +43,7 @@ class FileDownloader(static.File): class FileUploaderStream(stream.FileStream): - CHUNK_SIZE = 16*1024 + CHUNK_SIZE = 4*1024 def read(self, sendfile=False): if self.f is None: @@ -123,7 +123,7 @@ class TopLevel(resource.Resource): # serverFilter.buckets[None] = serverBucket # # self.factory.protocol = htb.ShapedProtocolFactory(self.factory.protocol, serverFilter) - self.factory = ThrottlingFactory(self.factory, writeLimit = 3*1024) + self.factory = ThrottlingFactory(self.factory, writeLimit = 30*1024) return self.factory def render(self, ctx): @@ -172,7 +172,7 @@ if __name__ == '__builtin__': class DB: def lookupHash(self, hash): - return [{'path': FilePath(os.path.expanduser('~/.xsession-errors'))}] + return [{'path': FilePath(os.path.expanduser('~/school/optout'))}] t = TopLevel(FilePath(os.path.expanduser('~')), DB(), None) factory = t.getHTTPFactory()