1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-24 20:03:07 +01: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,
DBOP = 16,
PING = 32,
PONG = 64,
RESERVED_1 = 64,
SETUP = 128 // used to handshake/auth the connection prior to handing over to Connection subclass
};

View File

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