All Manuals > LispWorks® User Guide and Reference Manual > 25 TCP and UDP socket communication and SSL

25.2 Connecting to a server

The function open-tcp-stream connects to a server and returns a stream (of type socket-stream). The stream is then used for communication through the socket using the standard Lisp I/O functions.

connect-to-tcp-server can also be used, especially if you want to subclass socket-stream.

25.2.1 Examples

For examples illustrating simple write and read on a socket, see:

(example-edit-file "capi/applications/chat.lisp")
(example-edit-file "capi/applications/chat-client.lisp")

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:24