_requestedUserModes('-')
{
_autoReconnectTimer.setSingleShot(true);
- _socketCloseTimer.setSingleShot(true);
connect(&_socketCloseTimer, SIGNAL(timeout()), this, SLOT(socketCloseTimeout()));
setPingInterval(networkConfig()->pingInterval());
socket.setProxy(QNetworkProxy::NoProxy);
}
+ enablePingTimeout();
+
#ifdef HAVE_SSL
- socket.setProtocol((QSsl::SslProtocol)server.sslVersion);
if (server.useSsl) {
CoreIdentity *identity = identityPtr();
if (identity) {
if (server.useSsl && !socket.isEncrypted())
return;
#endif
-
+#if QT_VERSION >= 0x040600
+ socket.setSocketOption(QAbstractSocket::KeepAliveOption, true);
+#endif
CoreIdentity *identity = identityPtr();
if (!identity) {
qCritical() << "Identity invalid!";
emit socketInitialized(identity, localAddress(), localPort(), peerAddress(), peerPort());
- enablePingTimeout();
-
// TokenBucket to avoid sending too much at once
_messageDelay = 2200; // this seems to be a safe value (2.2 seconds delay)
_burstSize = 5;