Set socket options to detect broken connection

pull/61/head
michal.szwaj 2018-04-04 18:26:20 +02:00
parent 2c8daca961
commit 4c01c5cc55
1 changed files with 2 additions and 0 deletions

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)