Skip to content
Newer
Older
100644 18 lines (15 sloc) 538 Bytes
df12e6a @ciaranbradley Land of Lisp Chapter 12
authored
1 ;;
2 ;; client.lisp
3 ;; usocket implementation of the socket tutorial
4 ;; from Land of Lisp Chapter 12 http://landoflisp.com
5 ;;
6 ;; Ciaran Bradley 2010
7
8 (defun stream-read (stream)
9 "Reads from a usocket connected stream"
10 (read (usocket:socket-stream stream)))
11
12 (defun stream-print (string stream)
13 "Prints to a usocket connected stream"
14 (print string (usocket:socket-stream stream))
7905cc5 @ciaranbradley Fixed incorrect use of my-socket
authored
15 (force-output (usocket:socket-stream stream)))
df12e6a @ciaranbradley Land of Lisp Chapter 12
authored
16
17 ;; Attempts to connect to the host port
7905cc5 @ciaranbradley Fixed incorrect use of my-socket
authored
18 (defparameter my-stream (usocket:socket-connect "127.0.0.1" 4321))
Something went wrong with that request. Please try again.