Exemple #1
0
void SslSocket::connectToHost(const QString &hostname, int port)
{
    qDebug() << "connect to host" << hostname;
    connect(d->socket, SIGNAL(connected()), SLOT(startHandshake()));
    connect(d->socket, SIGNAL(readyRead()), SLOT(dataReceived()));

    d->socket->connectToHost(hostname, port);
    d->state = Connecting;
}
Exemple #2
0
void JabberClient::connected()
{
    m_socket->readBuffer.init(0);
    m_socket->readBuffer.packetStart();
    m_socket->setRaw(true);
    log(L_DEBUG, "Connect ready");
    startHandshake();
    TCPClient::connect_ready();
    if (!m_bXML){
        m_parser = XML_ParserCreate("UTF-8");
        XML_SetUserData(m_parser, this);
        XML_SetElementHandler(m_parser, p_element_start, p_element_end);
        XML_SetCharacterDataHandler(m_parser, p_char_data);
        m_bXML = true;
    }
}