Set socket options to detect broken connection

This commit is contained in:
michal.szwaj 2018-04-04 18:26:20 +02:00 committed by Huan Truong
parent 2f0bf11e4b
commit 05df5328cd

View File

@ -46,6 +46,8 @@ void ConnectDialog::onConnectButtonClicked()
try
{
tcpWrapper_.setKeepAliveOption(*socket, true);
tcpWrapper_.setNoDelayOption(*socket, true);
tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
}
catch(const boost::system::system_error& se)