Inter-process Communication with Qt: Using a thread to make blocking calls over a socket
KDAB KDAB
12.8K subscribers
291 views
11

 Published On Sep 18, 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:    • Multithreading with Qt (Part 6) - Sig...  

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/tr...

Job Pattern video:    • C++ Applications Architecture Best Pr...  

All 'Inter-process communication with Qt' videos:    • Inter-process Communication with Qt s...  

All 'Qt Widgets and more' videos:    • Qt Widgets and more  

All 'QML Tips and Tricks' videos:    • QML Tips and Tricks  

About the host:
This video is presented by David Faure, who started with Qt back in 1998 in the KDE project where he's still very active. This gives him 22 years of experience with Qt. Since 2003 he has taught many Qt training courses, on topics such as Qt Widgets, Multithreading, Modern C++, and Debugging/Profiling on Linux. He has made many contributions to QtCore and QtDBus and has helped numerous customers, especially with Qt multithreading issues.

Every month our newsletter is featuring technical blogs on Qt, C++ and 3D topics: https://www.kdab.com/development-reso...

About KDAB:
KDAB offers experienced software experts to help you deliver functional, high-performing, and innovative software across embedded, mobile, and desktop platforms for projects using C++, Qt, QML/Qt Quick, OpenGL, Qt 3D, and more. https://www.kdab.com/software-services

KDAB experts regularly take time out to deliver KDAB’s world class training, in-house or at open enrollment courses around the world. We are the market leaders for training in Qt, OpenGL, and C++.

Contact us to find out more at [email protected] or visit our website: https://www.kdab.com/software-service...

We are about 90 people, located all around the world. Our Head Office is in Sweden and we have other offices in Germany, France, the UK, and the USA. https://www.kdab.com/about/contact/

show more

Share/Embed