added disconnect message to testbench

This commit is contained in:
Volker Fischer 2009-10-10 08:32:54 +00:00
parent 44be809457
commit 559945c424

View File

@ -54,6 +54,7 @@ public:
// connect and start the timer (testbench heartbeat)
QObject::connect ( &Timer, SIGNAL ( timeout() ),
this, SLOT ( OnTimer() ) );
Timer.start ( 1 ); // 1 ms
}
@ -74,7 +75,7 @@ public slots:
void OnTimer()
{
// generate random protocol message
switch ( GenRandomIntInRange ( 0, 10 ) )
switch ( GenRandomIntInRange ( 0, 11 ) )
{
case 0:
Protocol.CreateJitBufMes ( GenRandomIntInRange ( 0, 10 ) );
@ -121,6 +122,10 @@ public slots:
break;
case 10:
Protocol.CreateAndImmSendDisconnectionMes();
break;
case 11:
// arbitrary "audio" packet (with random sizes)
CVector<uint8_t> vecMessage ( GenRandomIntInRange ( 1, 1000 ) );
OnSendProtMessage ( vecMessage );