You are previewing Land of Lisp.

Land of Lisp

Cover of Land of Lisp by Conrad Barski M.D. Published by No Starch Press
O'Reilly logo

Working with Sockets

image with no caption

Now that we’ve used streams to communicate with the REPL and with files, let’s see how we can use them to communicate with another computer.

If you want to write a program that can communicate with another computer elsewhere on a standard network (almost all networks nowadays use the TCP/IP protocol), you’ll first need to create a socket. A socket is a mechanism for routing data over a computer network between programs running on different computers on that network.

Unfortunately, sockets didn’t make it into the ANSI Common Lisp standard, which means there’s no standard way of interacting with sockets at this time. However, every ...

The best content for your career. Discover unlimited learning on demand for around $1/day.