1.3 The Code
1.3.2 Client
1.3.2.1 Connection
1.3.2.2 Bot
1.3.2.3 Step
1.3.2.4 Tactics
1.3.2.5 Wandering
1.3.2.6 TCP Client
1.3.2.7 Viewer
1.3.2.8 TCP Viewer
8.14
1.3.2.6 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-steps connection actions)))
    (iterate (wandering-steps (connection request-hello)))))

(run)