Fixed tcp examples in lab directory. Thanks to Dudley Flanders for
reporting this.
This commit is contained in:
parent
30ac7870de
commit
f5f61f60d3
|
@ -6,7 +6,7 @@
|
|||
;;; and print everything that it returns.
|
||||
|
||||
(define (chargen host)
|
||||
(let-values ([(op ip) (tcp-connect host "chargen")])
|
||||
(let-values ([(ip op) (tcp-connect host "chargen")])
|
||||
(let ([ip (transcoded-port ip (native-transcoder))])
|
||||
(close-output-port op)
|
||||
(call/cc
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
;;; send a request and receive a response.
|
||||
|
||||
(define (http-cat host)
|
||||
(let-values ([(op ip) (tcp-connect host "http")])
|
||||
(let-values ([(ip op) (tcp-connect host "http")])
|
||||
(let ([op (transcoded-port op (native-transcoder))]
|
||||
[ip (transcoded-port ip (native-transcoder))])
|
||||
(display "GET /\n" op)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
;;; it succeeds. Pretty lame at this point, but it works.
|
||||
|
||||
(define (http-cat host)
|
||||
(let-values ([(op ip) (tcp-connect-nonblocking host "http")])
|
||||
(let-values ([(ip op) (tcp-connect-nonblocking host "http")])
|
||||
(let ([op (transcoded-port op (native-transcoder))]
|
||||
[ip (transcoded-port ip (native-transcoder))])
|
||||
(display "GET /\n" op)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
(define (echo host)
|
||||
(printf "Connecting\n")
|
||||
(let-values ([(op ip) (tcp-connect host "echo")])
|
||||
(let-values ([(ip op) (tcp-connect host "echo")])
|
||||
(printf "Connected\n")
|
||||
(let f ([bytes 0])
|
||||
(printf "~s " bytes)
|
||||
|
|
|
@ -1 +1 @@
|
|||
1811
|
||||
1812
|
||||
|
|
Loading…
Reference in New Issue