Interacting with sockets from the application

The next project to complete is mandelbrot-app. It will contain the QTcpServer that will interact with the workers and the picture drawing of the Mandelbrot set. As a reminder, the diagram of the mandelbrot-app architecture is shown here:

Interacting with sockets from the application

We will build this application from the ground up. Let's start with the class responsible for maintaining the connection with a specific Worker: WorkerClient. This class will live in its specific QThread and will interact with a Worker class using the same  QTcpSocket/QDataStream mechanism we covered in the last section.

In mandelbrot-app, create a new C++ class named  ...

Get Mastering Qt 5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.