Unsolved Delay while using QTcpSocket.
-
i have a TCP Server running on "Visual Studio" using "WinSock2" lib and client running on "Qt Creator" using "QTcpSocket" lib.
and i have 2 fixed structs, one goes from the server to the client and the other from the client to the server.
The problem is im having a ~= 1 Sec delay when i send a packet from the server "Visual Studio" to the client "Qt" ( everything works just fine when i send packets from the client to the server)
i have tested the server with another small client Qt project (with the same QTcpSocket class files i used before ) it works just fine.
but when i implement it with my Project, i get the 1 sec delay.so anyone can tell why i get that delay or how to find its reason in my code (using a debugging tool or something)
Note: Both the Client Class and the GUI runs in the same thread. could it be the reason why i get these delay ? -
It is surprised. Either sending is the delay or receiving is the delay. Packet trace should be able to help you. Also you can try with both client & server in VC , both using Qt. In both the case, it will use WinSock2 only.
-
@AmrMaatouk You should show how you're sending data