summaryrefslogtreecommitdiff
path: root/webproxyconn.cc
blob: a679803cf5d6ceb6d77c2b9e54c9245fda575439 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <QtCore/QDebug>

#include "sappeer.h"
#include "webproxyconn.h"

WebProxyConn::WebProxyConn(SAPConnection *conn, QObject *parent)
	: QObject(parent), _conn(conn), _socket(conn->sockets().first())
{
	connect(_conn, SIGNAL(disconnected()), SLOT(deleteLater()));
	Q_ASSERT(_socket);
	connect(_socket, SIGNAL(connected()), SLOT(handleConnected()));
	connect(_socket, SIGNAL(messageReceived()), SLOT(handleMessageReceived()));
}

void WebProxyConn::handleConnected()
{
	qDebug() << "WebProxy socket now connected!";
}

void WebProxyConn::handleMessageReceived()
{
	QByteArray data = _socket->receive();

	qDebug() << data << data.toHex();
}