By default rabbitmq-c sets TCP_NODELAY on:<br><br><a href="https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp_socket.c#L328">https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp_socket.c#L328</a><br>
<div><br></div><div>There should be no reason for you to be changing this socket parameter.</div><div><br></div><div>-Alan</div><br><div>On Wed May 21 2014 at 11:17:40 PM, Haster <<a href="mailto:haster2004@yandex.ru">haster2004@yandex.ru</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alan,<br>
<br>
In my program I use TCP_NODELAY option of socket.<br>
And now my code look like:<br>
<br>
      connection = amqp_new_connection();<br>
      if (!connection) {<br>
        throw RabbitMQException(-1, "Create connection error");<br>
      }<br>
      int sockfd = amqp_open_socket(hostName.c_<u></u>str(), portNumber);  //5672<br>
      if (sockfd < 0) {<br>
        std::string err_msg = "Opening socket: ";<br>
        err_msg += amqp_error_string2(sockfd);<br>
        throw RabbitMQException(-sockfd, err_msg.c_str());<br>
      }<br>
      int nodelay = 1;<br>
      setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*)&nodelay,<br>
sizeof(nodelay));<br>
      amqp_set_sockfd(connection, sockfd);<br>
<br>
But amqp_set_sockfd function is deprecated now and I'm afraid that it can be<br>
dropped in future versions.<br>
So can you add supporting TCP_NODELAY option in your future version of<br>
rabbitmq_c?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/Library-rabbitmq-c-and-TCP-NODELAY-tp35761.html" target="_blank">http://rabbitmq.1065348.n5.<u></u>nabble.com/Library-rabbitmq-c-<u></u>and-TCP-NODELAY-tp35761.html</a><br>

Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</blockquote>