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 ) ),
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 #### // #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
QObject::connect ( &Protocol, QObject::connect ( &Protocol,
SIGNAL ( OpusSupported() ), SIGNAL ( OpusSupported() ),

View file

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

View file

@ -534,11 +534,6 @@ case PROTMESSID_CHANNEL_NAME:
bRet = EvaluateChatTextMes ( vecbyMesBodyData ); bRet = EvaluateChatTextMes ( vecbyMesBodyData );
break; break;
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
case PROTMESSID_PING_MS:
bRet = EvaluatePingMes ( vecbyMesBodyData );
break;
case PROTMESSID_NETW_TRANSPORT_PROPS: case PROTMESSID_NETW_TRANSPORT_PROPS:
bRet = EvaluateNetwTranspPropsMes ( vecbyMesBodyData ); bRet = EvaluateNetwTranspPropsMes ( vecbyMesBodyData );
break; break;
@ -1187,38 +1182,6 @@ bool CProtocol::EvaluateChatTextMes ( const CVector<uint8_t>& vecData )
return false; // no error 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 ) void CProtocol::CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps )
{ {
int iPos = 0; // init position pointer int iPos = 0; // init position pointer

View file

@ -97,7 +97,6 @@ public:
void CreateChanInfoMes ( const CChannelCoreInfo ChanInfo ); void CreateChanInfoMes ( const CChannelCoreInfo ChanInfo );
void CreateReqChanInfoMes(); void CreateReqChanInfoMes();
void CreateChatTextMes ( const QString strChatText ); void CreateChatTextMes ( const QString strChatText );
void CreatePingMes ( const int iMs );
void CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps ); void CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps );
void CreateReqNetwTranspPropsMes(); void CreateReqNetwTranspPropsMes();
void CreateOpusSupportedMes(); void CreateOpusSupportedMes();
@ -213,7 +212,6 @@ protected:
bool EvaluateChanInfoMes ( const CVector<uint8_t>& vecData ); bool EvaluateChanInfoMes ( const CVector<uint8_t>& vecData );
bool EvaluateReqChanInfoMes(); bool EvaluateReqChanInfoMes();
bool EvaluateChatTextMes ( const CVector<uint8_t>& vecData ); bool EvaluateChatTextMes ( const CVector<uint8_t>& vecData );
bool EvaluatePingMes ( const CVector<uint8_t>& vecData );
bool EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData ); bool EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData );
bool EvaluateReqNetwTranspPropsMes(); bool EvaluateReqNetwTranspPropsMes();
bool EvaluateOpusSupportedMes(); bool EvaluateOpusSupportedMes();
@ -265,7 +263,6 @@ signals:
void ReqChanInfo(); void ReqChanInfo();
void OpusSupported(); void OpusSupported();
void ChatTextReceived ( QString strChatText ); void ChatTextReceived ( QString strChatText );
void PingReceived ( int iMs );
void NetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps ); void NetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps );
void ReqNetTranspProps(); 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[9], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh9 ( int ) ) );
QObject::connect ( &vecChannels[10], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh10 ( int ) ) ); QObject::connect ( &vecChannels[10], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh10 ( int ) ) );
QObject::connect ( &vecChannels[11], SIGNAL ( ServerAutoSockBufSizeChange ( int ) ), this, SLOT ( OnServerAutoSockBufSizeChangeCh11 ( 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 ) 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 OnServerAutoSockBufSizeChangeCh9 ( int iNNumFra ) { vecChannels[9].CreateJitBufMes ( iNNumFra ); }
void OnServerAutoSockBufSizeChangeCh10 ( int iNNumFra ) { vecChannels[10].CreateJitBufMes ( iNNumFra ); } void OnServerAutoSockBufSizeChangeCh10 ( int iNNumFra ) { vecChannels[10].CreateJitBufMes ( iNNumFra ); }
void OnServerAutoSockBufSizeChangeCh11 ( int iNNumFra ) { vecChannels[11].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_ ) */ #endif /* !defined ( SERVER_HOIHGE7LOKIH83JH8_3_43445KJIUHF1912__INCLUDED_ ) */

View file

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