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 ...

Get Land of Lisp now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.