Fixed tcp examples in lab directory. Thanks to Dudley Flanders for

reporting this.
This commit is contained in:
Abdulaziz Ghuloum 2009-06-26 12:04:39 +03:00
parent 30ac7870de
commit f5f61f60d3
5 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -1 +1 @@
1811
1812