Appendix 2A Socket Application

This appendix is devoted to the implementation of the library lib_chan, which was introduced in Controlling Processes with lib_chan. The code for lib_chan implements an entire layer of networking on top of TCP/IP, providing both authentication and streams of Erlang terms. Once we understand the principles used in lib_chan, we should be able to tailor-make our own communication infrastructure and layer it on top of TCP/IP.

In its own right, lib_chan is a useful component for building distributed systems.

To make the appendix self-contained, there is a considerable amount of overlap with the material in Controlling Processes with lib_chan.

The code in this appendix is some of the most complex code I’ve ...

Get Programming Erlang, 2nd Edition 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.