Chapter 5. A Core Data Server

Table of Contents

1. Overview
2. The Program
3. Walk-through
4. Building and Running
5. See Also

1. Overview

The server-core program is the simplest server: it works at the lowest layer, the core TCP server (vws_tcp_svr), which deals in raw inbound bytes rather than WebSocket messages, and echoes whatever it receives. It also shows the per-worker thread context — a constructor and destructor that give each worker thread its own state, delivered to the data callback as its ctx argument.