mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
Forgot to use the addrinfo if supplied.
This commit is contained in:
parent
50ace689b4
commit
3ff658e3a7
1 changed files with 6 additions and 4 deletions
|
@ -11,9 +11,11 @@
|
|||
(define (get-address-info host service . o)
|
||||
(%get-address-info host
|
||||
(if (integer? service) (number->string service) service)
|
||||
(make-address-info address-family/inet
|
||||
socket-type/stream
|
||||
ip-proto/tcp)))
|
||||
(if (and (pair? o) (car o))
|
||||
(car o)
|
||||
(make-address-info address-family/inet
|
||||
socket-type/stream
|
||||
ip-proto/tcp))))
|
||||
|
||||
;;> Opens a client net connection to @var{host}, a string,
|
||||
;;> on port @var{service}, which can be a string such as
|
||||
|
@ -22,7 +24,7 @@
|
|||
;;> or @scheme{#f} on failure.
|
||||
|
||||
(define (open-net-io host service)
|
||||
(let lp ((addr (get-address-info host service #f)))
|
||||
(let lp ((addr (get-address-info host service)))
|
||||
(if (not addr)
|
||||
(error "couldn't find address" host service)
|
||||
(let ((sock (socket (address-info-family addr)
|
||||
|
|
Loading…
Add table
Reference in a new issue