diff --git a/Lib/asyncore.py b/Lib/asyncore.py --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -526,13 +526,16 @@ class dispatcher_with_send(dispatcher): + # send() buffer size + BUFSIZE = 8192 + def __init__(self, sock=None, map=None): dispatcher.__init__(self, sock, map) self.out_buffer = b'' def initiate_send(self): num_sent = 0 - num_sent = dispatcher.send(self, self.out_buffer[:512]) + num_sent = dispatcher.send(self, self.out_buffer[:self.BUFSIZE]) self.out_buffer = self.out_buffer[num_sent:] def handle_write(self):