Example #1
0
void ClientTcpPush::requeteRecu()
{
    requeteClient.append(sockControle->readAll());

    if ( requeteClient.endsWith("\r\n\r\n") )
    {
        emit requeteComplete();
    }
}
Example #2
0
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()));
}
Example #4
0
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;
}