listen()¶
Purpose¶
listen() marks a stream socket as passive, allowing it to accept incoming connections.
Header¶
Prototype¶
Minimal Example¶
Common Pitfalls¶
- Confusing
backlogwith the maximum number of active clients. - Calling
listen()beforebind(). - Not accepting connections quickly enough under load.