Enable no delay option

pull/1/head
michal.szwaj 2018-07-17 16:18:01 +02:00
parent 894da2e214
commit 046b3b3815
1 changed files with 1 additions and 0 deletions

View File

@ -51,6 +51,7 @@ void TCPWrapper::asyncConnect(boost::asio::ip::tcp::socket& socket, const std::s
boost::system::error_code TCPWrapper::connect(boost::asio::ip::tcp::socket& socket, const std::string& hostname, uint16_t port)
{
boost::system::error_code ec;
socket.set_option(boost::asio::ip::tcp::no_delay(true), ec);
socket.connect(boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(hostname), port), ec);
return ec;
}