256 KiB send and receive buffers.
This commit is contained in:
parent
e4a9b43bed
commit
abc1e3edb2
|
@ -224,7 +224,7 @@ class HttpProtocol(asyncio.Protocol):
|
||||||
def connection_made(self, transport):
|
def connection_made(self, transport):
|
||||||
try:
|
try:
|
||||||
# TODO: Benchmark to find suitable write buffer limits
|
# TODO: Benchmark to find suitable write buffer limits
|
||||||
transport.set_write_buffer_limits(low=16384, high=65536)
|
transport.set_write_buffer_limits(low=16384, high=262144)
|
||||||
self.connections.add(self)
|
self.connections.add(self)
|
||||||
self.transport = transport
|
self.transport = transport
|
||||||
self._task = self.loop.create_task(self.connection_task())
|
self._task = self.loop.create_task(self.connection_task())
|
||||||
|
@ -254,8 +254,8 @@ class HttpProtocol(asyncio.Protocol):
|
||||||
return self.close()
|
return self.close()
|
||||||
self.recv_buffer += data
|
self.recv_buffer += data
|
||||||
|
|
||||||
# Buffer up to 64 KiB (TODO: configurable?)
|
# Buffer up to 256 KiB (TODO: configurable?)
|
||||||
if len(self.recv_buffer) > 65536:
|
if len(self.recv_buffer) > 262144:
|
||||||
self.transport.pause_reading()
|
self.transport.pause_reading()
|
||||||
|
|
||||||
if self._data_received:
|
if self._data_received:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user