ClientTcpPush::ClientTcpPush( QTcpSocket *sock, QList<QByteArray> &video, int time ): sockControle(sock), images(video), imgCourante(-1), tpi(time) { connect(sockControle, SIGNAL(readyRead()), this, SLOT(requeteRecu())); connect(this, SIGNAL(requeteComplete()), this, SLOT(traiterRequete())); }
DemandeTcpPull::DemandeTcpPull( QTcpSocket *sock, QList<QByteArray> &video): sockControle(sock), images(video) { numImageEnvoie=0; sockDonnees = new QTcpSocket(this); connect(sockControle, SIGNAL(readyRead()), this, SLOT(requeteRecu())); connect(this, SIGNAL(requeteComplete()), this, SLOT(traiterRequete())); }
ServeurUdpPull::ServeurUdpPull(): QTcpServer() { sockecoute = new QUdpSocket; chargerVideo(); sockecoute->bind(QHostAddress::Any, 11114, QUdpSocket::ShareAddress); //sock lié au port de 11114 ecoutant depuis toutes les adresses // et plusieurs a la fois connect(sockecoute, SIGNAL(readyRead()), this, SLOT(requeteRecu())); waitForNewConnection(); //attend une connection }
int Client::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: requeteComplete(); break; case 1: demandeClient((*reinterpret_cast< QByteArray(*)>(_a[1]))); break; case 2: requeteRecu(); break; case 3: traiterRequete(); break; default: ; } _id -= 4; } return _id; }