1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

* Actually, there's no need for a PONG command.

This commit is contained in:
Christian Muehlhaeuser
2010-11-25 05:35:45 +01:00
parent b43baf1887
commit 9cf4fce84d
2 changed files with 5 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ public:
COMPRESSED = 8, COMPRESSED = 8,
DBOP = 16, DBOP = 16,
PING = 32, PING = 32,
PONG = 64, RESERVED_1 = 64,
SETUP = 128 // used to handshake/auth the connection prior to handing over to Connection subclass SETUP = 128 // used to handshake/auth the connection prior to handing over to Connection subclass
}; };

View File

@@ -42,9 +42,9 @@ ControlConnection::~ControlConnection()
Connection* Connection*
ControlConnection::clone() ControlConnection::clone()
{ {
ControlConnection * clone = new ControlConnection(servent()); ControlConnection* clone = new ControlConnection( servent() );
clone->setOnceOnly(onceOnly()); clone->setOnceOnly( onceOnly() );
clone->setName(name()); clone->setName( name() );
return clone; return clone;
} }
@@ -176,13 +176,7 @@ ControlConnection::handleMsg( msg_ptr msg )
{ {
if ( msg->is( Msg::PING ) ) if ( msg->is( Msg::PING ) )
{ {
qDebug() << "Received Connection PING, sending PONG." << m_pingtimer_mark.elapsed(); qDebug() << "Received Connection PING, nice." << m_pingtimer_mark.elapsed();
sendMsg( Msg::factory( QByteArray(), Msg::PONG ) );
return;
}
else if ( msg->is( Msg::PONG ) )
{
qDebug() << "Received Connection PONG, nice.";
m_pingtimer_mark.restart(); m_pingtimer_mark.restart();
return; return;
} }