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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.