QTcpServer Problem
-
wrote on 17 Jan 2011, 16:20 last edited by
I have a problem with QTcpServer. When i send data from a client to server, it disconnects! but when i send from server to client it works fine!
i use write() for sending data and readall() to receive data.
all signals and slots are ok. -
wrote on 17 Jan 2011, 16:54 last edited by
Without showing the code, there is little we can do for you, I think.
-
wrote on 23 Jan 2011, 12:42 last edited by
thanks Andre. i solved the problem by using a bridge class as a thread. i find out that QTCPServer can not separately host tcp connections itself. so i joined another class contained a QTCPSocket object. now i can send and receive data with no problem. also i can have multiple connections to my server now.
if somebody had the same mean i can place the code here :-) -
wrote on 19 Jun 2012, 12:44 last edited by
Hello Mohsen,
I am a newbie in QT and it is exactly what I need, I need multiple connection to a server and the server has to send and receive data. Could you post or send me the code.
Thanks a lot
VPM
-
wrote on 19 Jun 2012, 15:31 last edited by
welcome to the forum
The post you are replying to is a bit older. So there are chances to have delayed or no replies.
You may also have a look to the "Network examples":http://qt-project.org/doc/qt-4.8/examples-network.html Especially the fortune "client":http://qt-project.org/doc/qt-4.8/network-fortuneclient.html and http://qt-project.org/doc/qt-4.8/network-fortuneserver.html are quite good for starting.
-
wrote on 8 Jun 2013, 07:48 last edited by
Hello Andre,
I have some problem in using QTcpSocket, How to Use QTcpSocket penetrate NAT, Can you give me some advice!
Thanwandks a lot -
wrote on 8 Jun 2013, 07:49 last edited by
Hello Andre,
I have some problem in using QTcpSocket, How to Use QTcpSocket penetrate NAT, Can you give me some advice!
Thanwandks a lot
[quote author="Andre" date="1295283294"]Without showing the code, there is little we can do for you, I think.[/quote] -
wrote on 9 Jun 2013, 05:18 last edited by
If you solved your problem must be marked [SOLVED]