For this exercise a program is open a socket to localhost on port 256 and send the message "hello socket world" before closing the socket.

Catching any exceptions or errors is not required.




(let* ((server (first (getaddrinfo "localhost" 256)))
       (sock (open-socket server.family sock-stream)))
  (sock-connect sock server)
  (put-string "hello socket world"))