Questions tagged [qtcpserver]

QTcpServer is a Qt class embedding a TCP-based server.

The QTcpServer class provides a TCP-based server.

This class makes it possible to accept incoming TCP connections. You can specify the port or have QTcpServer pick one automatically. You can listen on a specific address or on all the machine's addresses.

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

140 questions
0
votes
1 answer

Qt Client-server app, “send image” having problems

I am trying to send an image (OpenCV Mat) from client to server over a QDataStream. The first item is an int, the size of the buffer. It works for 10 to 15 images, then the server reads the first int a random number (usual ~2^30) which causes the…
cristiprg
  • 103
  • 1
  • 9
0
votes
1 answer

QThread and QTcpServer is that a good choice?

This is my first post here, I will try to explain my question as good as I can, don't hesitate to correct me because I'm a beginner. I'm using Qt to design a GUI to control a 3D engine. Qt and the 3D engine talk together using a QTcpserver. I can…
0
votes
1 answer

Qt5 QTcpSocket derived class and QTcpServer

I'm developing an application that made sense that I wrapped my classes around the implemented QTcpSocket (since it's a TCP protocol, and I need to be able to use the raw socket and the added features as seemlessly as possible). So, for the sake of…
OzBarry
  • 1,098
  • 1
  • 17
  • 44
0
votes
1 answer

QTcpServer -- how to stop client threads

My gui have a two button's, one to start a server & other to stop a server. Brief :--- Once server is started, on every new client request i will create a new thread & this will handle communication with the client. Detail :-- When start button is…
Katoch
  • 2,709
  • 9
  • 51
  • 84
0
votes
1 answer

telnet client not connecting -- to QTCPserver

Why i am not able to connect to a server running on my localhost using telnet client ? I am using windows-7 & telnet client is turned on in control panel. Please suggest how to make it working ? #define SERVER_PORT 5000 Tcp server is created in…
Katoch
  • 2,709
  • 9
  • 51
  • 84
0
votes
1 answer

Memory leak in QTcpServer attending connections in different thread

I'm developing a RPC server in Qt 4.7 on Windows 7. In order to attend several executions at the same time every request run in a separate thread (as functions might be blocking). I inherited from QTcpServer and reimplemented the incomingConnection…
pablo
  • 75
  • 4
0
votes
1 answer

TCP network communication security risks

I am developing an application that can establish a server-client connection using QTcp* The client sends the server a number. The received string is checked on its length and quality (is it really a number?) If everything is OK, then the server…
hytromo
  • 1,501
  • 2
  • 27
  • 57
0
votes
1 answer

QTcpServer synchronous connection

I was trying to use the synchronous connection mechanism of QTcpServer to implement a server. My code is very simple one. PFB. ////// MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainScreen) { …
vraj010
  • 116
  • 1
  • 2
  • 8
0
votes
1 answer

server response with QTCP Socket

I am connecting my code to an existing server and i am able to get response from the server. But the problem is the content of the response is too large to be handled in a simple way. Right now below is the piece of code that i use it to retrieve…
sankar
  • 347
  • 3
  • 4
  • 15
0
votes
0 answers

Server Response in QTCP SOCKET

I have attached the code I am working on. As you can see I am establishing connection with the server and I am waiting for the response of it. I am executing the command lb which lists me a set of commands. I have successfully established connection…
sankar
  • 347
  • 3
  • 4
  • 15
0
votes
0 answers

QT connection with existing server with username and password

I am working on adapter interface where i connect the simulator which i have constructed with an existing simulator running on a server. I have been going through the QAbstractSocket and I have got some basic idea of it. But the problem is the…
user2591311
  • 31
  • 1
  • 1
  • 5
0
votes
2 answers

Why QTcpSocket received wrong data?

I'm writing a simple network application. Client sending to server message server printing it in QTextEdit and responding to client . I'm using QTcpServer and QTcpSocket. There is a problem I can't solve. Receiving data is quint16 + QTime + QString…
Ilya Glushchenko
  • 317
  • 1
  • 6
  • 13
0
votes
1 answer

How to force QTcpServer listen on a specific port?

Is it possible to force QTcpServer to listen to a specific port smaller than 1024?
Gappa
  • 757
  • 2
  • 16
  • 34
0
votes
2 answers

Strange characters when transferring file with QTcpSocket

I'm trying to transfer a file using a QTcpSocket. The connection runs fine, but my problem is when I try to record the received bytes on a file. When I open the file there are some strange characters at the beginning of the file. What are these…
vanz
  • 319
  • 1
  • 2
  • 12
0
votes
2 answers

Qt using threadpools, unable to recieve all the data at once in readyRead()

I'm a newbie in QT and C++, I'm trying to create a QTcpserver using QThreadpools so it can handle multiple clients. Multiple clients are able to connect without any issues. But I'm trying to send an image from an android phone, with a footer…
Jerry
  • 424
  • 1
  • 4
  • 17
1 2 3
9
10