Consistently use non-blocking
This commit is contained in:
parent
4e564b4814
commit
7e55db0de7
3 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@
|
||||||
#:use-module (web uri)
|
#:use-module (web uri)
|
||||||
#:use-module (web client)
|
#:use-module (web client)
|
||||||
#:export (non-blocking-port
|
#:export (non-blocking-port
|
||||||
nonblocking-open-socket-for-uri))
|
non-blocking-open-socket-for-uri))
|
||||||
|
|
||||||
(define (non-blocking-port port)
|
(define (non-blocking-port port)
|
||||||
"Make PORT non-blocking and return it."
|
"Make PORT non-blocking and return it."
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
(fcntl port F_SETFL (logior O_NONBLOCK flags)))
|
(fcntl port F_SETFL (logior O_NONBLOCK flags)))
|
||||||
port))
|
port))
|
||||||
|
|
||||||
(define* (nonblocking-open-socket-for-uri uri
|
(define* (non-blocking-open-socket-for-uri uri
|
||||||
#:key (verify-certificate? #t))
|
#:key (verify-certificate? #t))
|
||||||
(define tls-wrap
|
(define tls-wrap
|
||||||
(@@ (web client) tls-wrap))
|
(@@ (web client) tls-wrap))
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,6 @@
|
||||||
(response-code
|
(response-code
|
||||||
(http-get
|
(http-get
|
||||||
uri
|
uri
|
||||||
#:port (nonblocking-open-socket-for-uri uri)))))))
|
#:port (non-blocking-open-socket-for-uri uri)))))))
|
||||||
|
|
||||||
(display "non-blocking test finished successfully\n")
|
(display "non-blocking test finished successfully\n")
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
(response-code
|
(response-code
|
||||||
(http-get
|
(http-get
|
||||||
uri
|
uri
|
||||||
#:port (nonblocking-open-socket-for-uri uri)))))))
|
#:port (non-blocking-open-socket-for-uri uri)))))))
|
||||||
|
|
||||||
(display "web-server test finished successfully\n")
|
(display "web-server test finished successfully\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue