CHAPTER 12

image

Multicore Web Server

Given that the Raspberry Pi 2 has four CPU cores of bristling computing power, this chapter provides an example web server project that can use them all. Although this project uses the C libevent library in the background, a nice C++ class wraps up the the C API in a nice convenient C++ package. In this chapter we examine a web server built from scratch (apart from libevent) that is fast and lean. Most important, it can be easily extended to do just about anything the Pi can do.

libevent

The C library libevent has been a popular, time-tested library for implementing portable web servers and web clients. The main ...

Get Exploring the Raspberry Pi 2 with C++ now with O’Reilly online learning.

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