Exemplo n.º 1
0
 void Connection::init() {
   connect(this, SIGNAL(connected()), SLOT(handshake()));
   connect(this, SIGNAL(readyRead()), SLOT(onDataReady()));
   connect(this, SIGNAL(encrypted()), SLOT(onEncrypted()));
   connect(this, SIGNAL(sslErrors(const QList<QSslError>&)),
           SLOT(onSslErrors(const QList<QSslError>&)));
   connect(this, SIGNAL(bytesWritten(qint64)), SLOT(sendNext(qint64)));  
 }
Exemplo n.º 2
0
DeviceAgent::DeviceAgent(QObject *parent): QSslSocket(parent)
{
    connect(this,SIGNAL(readyRead()),this,SLOT(onDataComing()));
    connect(this, SIGNAL(disconnected()), this, SLOT(onDeviceDisconnected()));

    connect(this, SIGNAL(encrypted()), this, SLOT(onEncrypted()));
    connect(this, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(onSslErrors(QList<QSslError>)));

    m_dataPos = 0;
}