Hi, when your esp device sends data, is it using the same tcp connection or a new one?
If it is using the same (it is preferred) I suggest you to define an object for each device with a dedicated buffer.
If not please check if the device wait to have sent all bytes in the queue before to disconnect form the server.
I made more then one sofwtare based on Qt to manage iot devices based on tcp or rs232.
I suggest you to use a thread for each connection (if they are not so much, for example less than 1000) or to manage more than one connection for each thread.
Using a thread, it is more easy to implement a machine state to manage the device.
Pay attention ad the function readSocket. if the device sends for example 64 byte in one socket operation, the function could be fired more than one time.
Qt Medical
Qt Medical
13
Topics
40
Posts
-
Tcp Socket Server performance
Unsolved -
Just for fun....
Unsolved -
-
-
-
-
Viability of QT for pharma setting
Unsolved -
-
-
cross compilation error
Unsolved -
-
-