Chapter 3. Berkeley Sockets

This chapter introduces the most commonly used networking construct for multiplayer game development, the Berkeley Socket. It presents the most common functions for creating, manipulating, and disposing sockets, discusses differences between platforms, and explores a type-safe, C++ friendly wrapper for socket functionality.

Creating Sockets

Originally released as part of BSD 4.2, the Berkeley Sockets API provides a standardized way for processes to interface with various levels of the TCP/IP stack. Since its release, the API has been ported to every major operating system and most popular programming languages, so it is the veritable standard in network programming.

Processes use the API by creating and initializing ...

Get Multiplayer Game Programming: Architecting Networked Games, 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.