ASIO ip::tcp::iostream and TCP_NODELAY
How do i set TCP_NODELAY option if i use ip::tcp::iostream? I need a soc开发者_如何学Pythonket for this, but i can't find how to extract it from iostream.
use iostream::rdbuf()
#include <boost/asio.hpp>
int
main()
{
boost::asio::ip::tcp::iostream stream;
const boost::asio::ip::tcp::no_delay option( true );
stream.rdbuf()->set_option( option );
}
精彩评论