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:
@@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user