remove legacy ping time message (now very old versions of llcon do not get ping measurements from the server anymore)

This commit is contained in:
Volker Fischer 2013-09-07 20:30:08 +00:00
parent 762a6283c6
commit ef76866d6f
7 changed files with 15 additions and 98 deletions

View File

@ -92,11 +92,6 @@ CChannel::CChannel ( const bool bNIsServer ) :
SIGNAL ( ChatTextReceived ( QString ) ),
SIGNAL ( ChatTextReceived ( QString ) ) );
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
QObject::connect( &Protocol,
SIGNAL ( PingReceived ( int ) ),
SIGNAL ( PingReceived ( int ) ) );
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
QObject::connect ( &Protocol,
SIGNAL ( OpusSupported() ),

View File

@ -141,7 +141,6 @@ Protocol.CreateChanNameMes ( ChInfo.strName );
void CreateReqJitBufMes() { Protocol.CreateReqJitBufMes(); }
void CreateReqConnClientsList() { Protocol.CreateReqConnClientsList(); }
void CreateChatTextMes ( const QString& strChatText ) { Protocol.CreateChatTextMes ( strChatText ); }
void CreatePingMes ( const int iMs ) { Protocol.CreatePingMes ( iMs ); }
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
void CreateConClientListNameMes ( const CVector<CChannelInfo>& vecChanInfo )
@ -228,7 +227,6 @@ signals:
void ReqChanInfo();
void OpusSupported();
void ChatTextReceived ( QString strChatText );
void PingReceived ( int iMs );
void ReqNetTranspProps();
void Disconnected();

View File

@ -534,11 +534,6 @@ case PROTMESSID_CHANNEL_NAME:
bRet = EvaluateChatTextMes ( vecbyMesBodyData );
break;
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
case PROTMESSID_PING_MS:
bRet = EvaluatePingMes ( vecbyMesBodyData );
break;
case PROTMESSID_NETW_TRANSPORT_PROPS:
bRet = EvaluateNetwTranspPropsMes ( vecbyMesBodyData );
break;
@ -1187,38 +1182,6 @@ bool CProtocol::EvaluateChatTextMes ( const CVector<uint8_t>& vecData )
return false; // no error
}
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
void CProtocol::CreatePingMes ( const int iMs )
{
int iPos = 0; // init position pointer
// build data vector (4 bytes long)
CVector<uint8_t> vecData ( 4 );
// transmit time (4 bytes)
PutValOnStream ( vecData, iPos, static_cast<uint32_t> ( iMs ), 4 );
CreateAndSendMessage ( PROTMESSID_PING_MS, vecData );
}
bool CProtocol::EvaluatePingMes ( const CVector<uint8_t>& vecData )
{
int iPos = 0; // init position pointer
// check size
if ( vecData.Size() != 4 )
{
return true; // return error code
}
// invoke message action
emit PingReceived ( static_cast<int> ( GetValFromStream ( vecData, iPos, 4 ) ) );
return false; // no error
}
void CProtocol::CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps )
{
int iPos = 0; // init position pointer

View File

@ -97,7 +97,6 @@ public:
void CreateChanInfoMes ( const CChannelCoreInfo ChanInfo );
void CreateReqChanInfoMes();
void CreateChatTextMes ( const QString strChatText );
void CreatePingMes ( const int iMs );
void CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps );
void CreateReqNetwTranspPropsMes();
void CreateOpusSupportedMes();
@ -213,7 +212,6 @@ protected:
bool EvaluateChanInfoMes ( const CVector<uint8_t>& vecData );
bool EvaluateReqChanInfoMes();
bool EvaluateChatTextMes ( const CVector<uint8_t>& vecData );
bool EvaluatePingMes ( const CVector<uint8_t>& vecData );
bool EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData );
bool EvaluateReqNetwTranspPropsMes();
bool EvaluateOpusSupportedMes();
@ -265,7 +263,6 @@ signals:
void ReqChanInfo();
void OpusSupported();
void ChatTextReceived ( QString strChatText );
void PingReceived ( int iMs );
void NetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps );
void ReqNetTranspProps();

View File

@ -489,22 +489,6 @@ CServer::CServer ( const int iNewNumChan,
QObject::connect ( &vecChannels[9], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh9 ( int ) ) );
QObject::connect ( &vecChannels[10], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh10 ( int ) ) );
QObject::connect ( &vecChannels[11], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh11 ( int ) ) );
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
QObject::connect ( &vecChannels[0], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh0 ( int ) ) );
QObject::connect ( &vecChannels[1], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh1 ( int ) ) );
QObject::connect ( &vecChannels[2], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh2 ( int ) ) );
QObject::connect ( &vecChannels[3], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh3 ( int ) ) );
QObject::connect ( &vecChannels[4], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh4 ( int ) ) );
QObject::connect ( &vecChannels[5], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh5 ( int ) ) );
QObject::connect ( &vecChannels[6], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh6 ( int ) ) );
QObject::connect ( &vecChannels[7], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh7 ( int ) ) );
QObject::connect ( &vecChannels[8], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh8 ( int ) ) );
QObject::connect ( &vecChannels[9], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh9 ( int ) ) );
QObject::connect ( &vecChannels[10], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh10 ( int ) ) );
QObject::connect ( &vecChannels[11], SIGNAL ( PingReceived ( int ) ), this, SLOT ( OnPingReceivedCh11 ( int ) ) );
}
void CServer::OnSendProtMessage ( int iChID, CVector<uint8_t> vecMessage )

View File

@ -402,22 +402,6 @@ public slots:
void OnServerAutoSockBufSizeChangeCh9 ( int iNNumFra ) { vecChannels[9].CreateJitBufMes ( iNNumFra ); }
void OnServerAutoSockBufSizeChangeCh10 ( int iNNumFra ) { vecChannels[10].CreateJitBufMes ( iNNumFra ); }
void OnServerAutoSockBufSizeChangeCh11 ( int iNNumFra ) { vecChannels[11].CreateJitBufMes ( iNNumFra ); }
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
void OnPingReceivedCh0 ( int iMs ) { vecChannels[0].CreatePingMes ( iMs ); }
void OnPingReceivedCh1 ( int iMs ) { vecChannels[1].CreatePingMes ( iMs ); }
void OnPingReceivedCh2 ( int iMs ) { vecChannels[2].CreatePingMes ( iMs ); }
void OnPingReceivedCh3 ( int iMs ) { vecChannels[3].CreatePingMes ( iMs ); }
void OnPingReceivedCh4 ( int iMs ) { vecChannels[4].CreatePingMes ( iMs ); }
void OnPingReceivedCh5 ( int iMs ) { vecChannels[5].CreatePingMes ( iMs ); }
void OnPingReceivedCh6 ( int iMs ) { vecChannels[6].CreatePingMes ( iMs ); }
void OnPingReceivedCh7 ( int iMs ) { vecChannels[7].CreatePingMes ( iMs ); }
void OnPingReceivedCh8 ( int iMs ) { vecChannels[8].CreatePingMes ( iMs ); }
void OnPingReceivedCh9 ( int iMs ) { vecChannels[9].CreatePingMes ( iMs ); }
void OnPingReceivedCh10 ( int iMs ) { vecChannels[10].CreatePingMes ( iMs ); }
void OnPingReceivedCh11 ( int iMs ) { vecChannels[11].CreatePingMes ( iMs ); }
};
#endif /* !defined ( SERVER_HOIHGE7LOKIH83JH8_3_43445KJIUHF1912__INCLUDED_ ) */

View File

@ -105,7 +105,7 @@ public slots:
CChannelCoreInfo ChannelCoreInfo;
// generate random protocol message
switch ( GenRandomIntInRange ( 0, 25 ) )
switch ( GenRandomIntInRange ( 0, 24 ) )
{
case 0:
Protocol.CreateJitBufMes ( GenRandomIntInRange ( 0, 10 ) );
@ -167,10 +167,6 @@ public slots:
break;
case 10:
Protocol.CreatePingMes ( GenRandomIntInRange ( 0, 100000 ) );
break;
case 11:
NetTrProps.eAudioCodingType =
static_cast<EAudComprType> ( GenRandomIntInRange ( 0, 2 ) );
@ -184,30 +180,30 @@ public slots:
Protocol.CreateNetwTranspPropsMes ( NetTrProps );
break;
case 12:
case 11:
Protocol.CreateReqNetwTranspPropsMes();
break;
case 13:
case 12:
Protocol.CreateOpusSupportedMes();
break;
case 14:
case 13:
Protocol.CreateCLPingMes ( CurHostAddress,
GenRandomIntInRange ( -2, 1000 ) );
break;
case 15:
case 14:
Protocol.CreateCLPingWithNumClientsMes ( CurHostAddress,
GenRandomIntInRange ( -2, 1000 ),
GenRandomIntInRange ( -2, 1000 ) );
break;
case 16:
case 15:
Protocol.CreateCLServerFullMes ( CurHostAddress );
break;
case 17:
case 16:
ServerInfo.bPermanentOnline =
static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) );
@ -224,11 +220,11 @@ public slots:
ServerInfo );
break;
case 18:
case 17:
Protocol.CreateCLUnregisterServerMes ( CurHostAddress );
break;
case 19:
case 18:
vecServerInfo[0].bPermanentOnline =
static_cast<bool> ( GenRandomIntInRange ( 0, 1 ) );
@ -246,29 +242,29 @@ public slots:
vecServerInfo );
break;
case 20:
case 19:
Protocol.CreateCLReqServerListMes ( CurHostAddress );
break;
case 21:
case 20:
Protocol.CreateCLSendEmptyMesMes ( CurHostAddress,
CurHostAddress );
break;
case 22:
case 21:
Protocol.CreateCLEmptyMes ( CurHostAddress );
break;
case 23:
case 22:
Protocol.CreateCLDisconnection ( CurHostAddress );
break;
case 24:
case 23:
Protocol.CreateAndImmSendAcknMess ( GenRandomIntInRange ( -10, 100 ),
GenRandomIntInRange ( -100, 100 ) );
break;
case 25:
case 24:
// arbitrary "audio" packet (with random sizes)
CVector<uint8_t> vecMessage ( GenRandomIntInRange ( 1, 1000 ) );
OnSendProtMessage ( vecMessage );