Fixing open-net-io to include socket in list of results.

This commit is contained in:
Alex Shinn 2012-10-15 20:12:57 +09:00
parent c4edcc8d78
commit 4a86e133a9
2 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,8 @@
(cond-expand
(threads (set-file-descriptor-flags! sock open/non-block))
(else #f))
(list (open-input-file-descriptor sock #t)
(list sock
(open-input-file-descriptor sock #t)
(open-output-file-descriptor sock #t)))))))))
;;> Convenience wrapper around @scheme{open-net-io}, opens

View file

@ -75,8 +75,8 @@
host
(or (uri-port uri)
(if (eq? 'https (uri-scheme uri)) 443 80))))
(in (car io))
(out (car (cdr io))))
(in (cadr io))
(out (car (cddr io))))
(display "GET " out)
(display (or (uri-path uri) "/") out)
(display " HTTP/1.0\r\n" out)