Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
18 September 2024
In this video, you will see an alternative to the asynchronous handling done in the previous video. If the socket is managed by a separate thread, it becomes possible to implement the protocol in a synchronous manner, which is much easier.
For more details about event handling in a separate thread, and cross-thread communication with signals and slots, see my earlier video: https://youtu.be/lTJ-QkC_Sxw?list=PL6CJYn40gN6jgr-Rpl3J4XDQYhmUnxb-g
The example shown here uses a local socket, but the code would be very similar if the two processes were on different machines, you would basically use QTcpServer and QTcpSocket instead of QLocalServer and QLocalSocket.
Code shown in this video: https://github.com/KDABLabs/kdabtv/tree/master/InterProcessCommunication/Sockets-part3-using-thread
Job Pattern video: https://www.youtube.com/watch?v=y1cYW7xMkpA
All 'Inter-process communication with Qt' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6jlyNTFcXhmOEht-CI7XZht
All 'Qt Widgets and more' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
All 'QML Tips and Tricks' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Upgrade your applications from Qt 5 to Qt 6 with KDAB’s migration services. Get a free migration assessment and join a hands-on workshop to prepare your team for a successful transition!
Learn more