8.14
1.2.7 TCP Client
Source code at tcp-client.rkt
The TCP client connects to a TCP server and sets up a list of actions.
It continuously performs the actions, which generates a new set of actions.
(define (run) (let* ([connection (connect-remote "localhost" 8080)]) (define (iterate actions) (iterate (perform-actions connection actions))) (iterate (gathering-actions (connection request-hello)))))
(run)