#include "bctest.h" BcTest::BcTest() : QObject() { m_bc = new Broadcast(false, this); m_serv = new Broadcast(true, this); connect(m_bc, SIGNAL(serverDiscovered(QHostAddress)), this, SLOT(newServer(QHostAddress))); } void BcTest::test() { int ps = 6949, pc = 6948; if(!m_serv->start(ps, pc)) { qDebug()<getError(); Q_ASSERT(false); } if(!m_bc->start(pc, ps)) { qDebug()<getError(); Q_ASSERT(false); } } void BcTest::newServer(QHostAddress ad) { qDebug()<<"New Server:"<