Node:Internet Socket Client, Next:Internet Socket Server, Up:Internet Socket Examples
The following example demonstrates an Internet socket client.
It connects to the HTTP daemon running on the local machine and
returns the contents of the root index URL.
(let ((s (socket AF_INET SOCK_STREAM 0))) (connect s AF_INET (inet-aton "127.0.0.1") 80) (display "GET / HTTP/1.0\r\n\r\n" s) (do ((line (read-line s) (read-line s))) ((eof-object? line)) (display line) (newline)))