Set socket options to detect broken connection
This commit is contained in:
parent
2c8daca961
commit
4c01c5cc55
@ -46,6 +46,8 @@ void ConnectDialog::onConnectButtonClicked()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
tcpWrapper_.setKeepAliveOption(*socket, true);
|
||||||
|
tcpWrapper_.setNoDelayOption(*socket, true);
|
||||||
tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
|
tcpWrapper_.asyncConnect(*socket, ipAddress, 5277, std::bind(&ConnectDialog::connectHandler, this, std::placeholders::_1, ipAddress, socket));
|
||||||
}
|
}
|
||||||
catch(const boost::system::system_error& se)
|
catch(const boost::system::system_error& se)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user