Author giampaolo.rodola
Recipients alanmcintyre, giampaolo.rodola, josiahcarlson
Date 2007-11-16.02:45:17
SpamBayes Score 0.066761
Marked as misclassified No
Message-id <1195181119.79.0.239734992818.issue1736190@psf.upfronthosting.co.za>
In-reply-to
Content
The current implementation of asynchat.async_chat.initiate_send method
doesn't look at what is specified in ac_out_buffer_size attribute which
represents the buffer size of the outgoing data defaulting to a maximum
of 4096 bytes to send in a single socket.send() call.

Note that this only happens when sending the data by using a producer
through the use of the push_with_producer method.
This happens because while the older asynchat version used slicing for
buffering:

> num_sent = self.send(self.ac_out_buffer[:obs]) # obs == ac_out_buffer_size

...the newer version just calls self.send using the entire data as
argument without caring of what ac_out_buffer_size thinks about it:

> num_sent = self.send(first)

What is specified in ac_out_buffer_size when using a producer is just
ignored and the only way to have control over the outgoing data buffer
is to operate directly on the producer.
History
Date User Action Args
2007-11-16 02:45:20giampaolo.rodolasetspambayes_score: 0.066761 -> 0.066761
recipients: + giampaolo.rodola, josiahcarlson, alanmcintyre
2007-11-16 02:45:19giampaolo.rodolasetspambayes_score: 0.066761 -> 0.066761
messageid: <1195181119.79.0.239734992818.issue1736190@psf.upfronthosting.co.za>
2007-11-16 02:45:19giampaolo.rodolalinkissue1736190 messages
2007-11-16 02:45:18giampaolo.rodolacreate