I'm use QNetworkAccessManager to visit couchdb
http://127.0.0.1:5984/chat/_changes?feed=continuous&since=1
http://127.0.0.1:5984/chat/_changes?feed=continuous&since=1
To copy to clipboard, switch view to plain text mode
couchdb args continuous means http keep-alive
m_getContinuousManager = new QNetworkAccessManager(this);
connect(m_getContinuousManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(newMsg(QNetworkReply*)));
m_getContinuousManager = new QNetworkAccessManager(this);
connect(m_getContinuousManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(newMsg(QNetworkReply*)));
To copy to clipboard, switch view to plain text mode
void newMsg(QNetworkReply *reply)
{
qDebug() << reply->readAll()
}
void newMsg(QNetworkReply *reply)
{
qDebug() << reply->readAll()
}
To copy to clipboard, switch view to plain text mode
but my function newMsg only exec once
Bookmarks