diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2015-05-23 23:56:51 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2015-05-31 22:57:38 -0700 |
commit | 2bc1f9b1b03c217512ce7026f76976cdcb8cc17e (patch) | |
tree | ec9d45fc68e1f1dedb570b1694df34738c8cbb04 /librabbitmq/amqp_openssl.c | |
parent | ed363ad6db549e9d3fa57f7ca761032eecb2a1a1 (diff) | |
download | rabbitmq-c-2bc1f9b1b03c217512ce7026f76976cdcb8cc17e.tar.gz |
lib: use MSG_MORE on Linux for basic.publish
As a performance optimization in the send path, add an AMQP_SF_MORE flag
indicating that more data is intended to be sent, and that packets shouldn't be
sent out on the wire unless there is a full packet's worth of data available.
Use this to specify MSG_MORE to send() on Linux.
Diffstat (limited to 'librabbitmq/amqp_openssl.c')
-rw-r--r-- | librabbitmq/amqp_openssl.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c index c3c6294..76c0d56 100644 --- a/librabbitmq/amqp_openssl.c +++ b/librabbitmq/amqp_openssl.c @@ -76,11 +76,8 @@ struct amqp_ssl_socket_t { int internal_error; }; -static ssize_t -amqp_ssl_socket_send(void *base, - const void *buf, - size_t len) -{ +static ssize_t amqp_ssl_socket_send(void *base, const void *buf, size_t len, + int flags) { struct amqp_ssl_socket_t *self = (struct amqp_ssl_socket_t *)base; ssize_t res; if (-1 == self->sockfd) { |