This guide explores how to build a TCP server in Zig using the epoll system call, which is specific to Linux and offers various advantages over poll. The article introduces the three key epoll system calls (`epoll_create1`, `epoll_ctl`, and `epoll_wait`) and explains how to use them to manage socket events more efficiently. The guide also covers how to associate each epoll event with client-specific data, simplifying client management, and demonstrates how to implement edge-triggered notifications.
Sort: