summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-08-13 14:49:28 +0200
committerKurt Pattyn <pattyn.kurt@gmail.com>2013-08-13 14:49:28 +0200
commit0228a9413439533e3b67ce7a7637df25a66ff8b2 (patch)
tree0aa12973c734631ecdad8095c9130e3aad1797cc /examples
parenta35af277af59b097750c77a402d2111a2817a5ed (diff)
downloadqtwebsockets-0228a9413439533e3b67ce7a7637df25a66ff8b2.tar.gz
Added doxygen snippet tags
Diffstat (limited to 'examples')
-rw-r--r--examples/echoclient/echoclient.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/echoclient/echoclient.cpp b/examples/echoclient/echoclient.cpp
index d469867..095e3bd 100644
--- a/examples/echoclient/echoclient.cpp
+++ b/examples/echoclient/echoclient.cpp
@@ -1,6 +1,7 @@
#include "echoclient.h"
#include <QDebug>
+//! [constructor]
EchoClient::EchoClient(const QUrl &url, QObject *parent) :
QObject(parent),
m_webSocket()
@@ -8,15 +9,20 @@ EchoClient::EchoClient(const QUrl &url, QObject *parent) :
connect(&m_webSocket, SIGNAL(connected()), this, SLOT(onConnected()));
m_webSocket.open(QUrl(url));
}
+//! [constructor]
+//! [onConnected]
void EchoClient::onConnected()
{
qDebug() << "Websocket connected";
connect(&m_webSocket, SIGNAL(textMessageReceived(QString)), this, SLOT(onTextMessageReceived(QString)));
m_webSocket.send("Hello, world!");
}
+//! [onConnected]
+//! [onTextMessageReceived]
void EchoClient::onTextMessageReceived(QString message)
{
qDebug() << "Message received:" << message;
}
+//! [onTextMessageReceived]