aboutsummaryrefslogtreecommitdiff
path: root/client/mytcpsocket.cpp
diff options
context:
space:
mode:
authorNielsCoding <n.stunnebrink@student.avans.nl>2022-10-29 21:38:47 +0200
committerNielsCoding <n.stunnebrink@student.avans.nl>2022-10-29 21:38:47 +0200
commitb5322d74d1839c4af490f5c7297e439a8433ba9b (patch)
tree4b7431f7daa0db37ee797d7312dc041700c39f0e /client/mytcpsocket.cpp
parent06376c3cfefdb01f8f4884c1b853edc16c89d1c8 (diff)
merging TCPcode with main QT code
Diffstat (limited to 'client/mytcpsocket.cpp')
-rw-r--r--client/mytcpsocket.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/client/mytcpsocket.cpp b/client/mytcpsocket.cpp
deleted file mode 100644
index 92dd67a..0000000
--- a/client/mytcpsocket.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <mytcpsocket.h>
-
-MyTcpSocket::MyTcpSocket(QObject *parent) :
- QObject(parent)
-{
-}
-
-void MyTcpSocket::doConnect()
-{
- socket = new QTcpSocket(this);
-
- connect(socket, SIGNAL(connected()),this, SLOT(connected()));
- connect(socket, SIGNAL(disconnected()),this, SLOT(disconnected()));
- // connect(socket, SIGNAL(bytesWritten(qint64)),this, SLOT(bytesWritten(qint64)));
- connect(socket, SIGNAL(readyRead()),this, SLOT(readyRead()));
- qDebug() << "connectig...";
-
- socket->connectToHost("192.168.137.141",80);
-
- if(!socket->waitForConnected(5000)){
- qDebug()<<"Error: "<< socket->errorString();
- }
-}
-
-void MyTcpSocket::connected(){
- qDebug() << "connected...";
-
- socket->write("Weerdata: Temp:?\r\n\r\n\r\n\r\n");
-
-}
-void MyTcpSocket::disconnected(){
- qDebug() << "disconnected...";
-
-}
-
-void MyTcpSocket::bytesWritten(qint64 bytes){
- qDebug() << bytes << "bytes written...";
-
-}
-void MyTcpSocket::readyRead(){
- qDebug() << "reading...";
-
- qDebug() << socket->readAll();
-}