This is a recent need to implement a TCP-based protocol that is more complex to communicate with devices before the problem is not too clear
And then I saw this, and suddenly enlightened.
This is a TCP-related explanation for QT:
http://www.bogotobogo.com/Qt/Qt5_Asynchronous_QTcpServer_QThreadPool.php
http://blog.csdn.net/chenlong12580/article/details/7431864
http://blog.csdn.net/chenlong12580/article/details/9003139
QT serial communication, of course, there are blocking and non-blocking, call Waitforxx function will suspend the current caller thread, then blocked.
http://blog.csdn.net/chenlong12580/article/details/8976176
http://blog.csdn.net/chenlong12580/article/details/9003139
Note: If the main function does not enter the primary event loop of QT, then the CONNECT function will have no effect.
synchronous, asynchronous, blocking, and non-blocking