Moving to the Server Side
Back to our regularly scheduled network programming (get it?!). In this section, we’ll start working on our chat server. We’ll leverage what you learned from the simple echo server in Chapter 2, TCP: Exploring the Basics, and build on top of it. Let’s create our connection acceptor.
Our acceptor process needs to accept incoming TCP connections, just like the acceptor in the previous chapter. But we’ll do things a little differently this time around: we’ll supervise client connections. This is for a couple of reasons. First and foremost, we want to isolate failures in the processes that handle connections. If one of them crashes, we don’t want the acceptor process to exit just because it’s linked to it. The other ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access