9.10. An RPC Server for Mandelbrot Sets

Chapter 6 demonstrates a simple Mandelbrot-set program and shows how to multi-thread it. It is fairly easy to add RPCs to the Mandelbrot program, and this idea was the basis for the discussion of RPC design issues in Section 9.3.

This section presents the Mandelbrot-set code using a single RPC call for each pixel in the image. The following section shows how to significantly improve the speed of the Mandelbrot program by using one RPC call for each scan line of the image rather than for each pixel.

Listings 9.18 through 9.26 contain all of the code and auxiliary files necessary to create the Mandelbrot program's RPC server and client.

Code Listing 9.18. The work function of the RPC server (ccrpc.cpp)

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 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.