[PATCH] s4: smbcli_transport_send hit the socket right away if possible

Sam Liddicott sam at liddicott.com
Tue Jun 9 11:51:44 GMT 2009

[Metze; "make test" on git master outputs exactly the same test summary
with our without this patch (apart from the "using seed" lines)]

If the transport socket is writable, then push the queue along
rather than wait until the caller returns back to the tevent loop.

This strategy keeps the sockets piping hot, and is particularly good
for cases where reading requests from one socket causes lots of
writes on another socket, or where lots of writes are made in a batch.

It doesn't matter if the socket is not writeable yet, packet_queue_run
will return quite cheaply in such a case.

Signed-off-by: Sam Liddicott <sam at liddicott.com>
 source4/libcli/raw/clitransport.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2bd306992fd7b59c6110bfce5b97329389e893cb.diff
Type: text/x-patch
Size: 574 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090609/d36a17f1/2bd306992fd7b59c6110bfce5b97329389e893cb.bin

More information about the samba-technical mailing list