Support for non-blocking use
I've been testing doing HTTP requests in Guile with non blocking sockets, and it can be made to work.
One issue I came up against is that Guile/guile-gnutls don't use the handshake operation in a way that works with non-blocking sockets. handshake can return eagain in this situation, but this isn't handled appropriately. It's not obvious to me where this should be handled, but maybe if a binding is added for gnutls_record_get_direction
, then tls-wrap
in Guile can be changed to use this to call the appropriate waiter on the socket.
Note that you can workaround this above issue by marking the socket as non blocking once the handshake has been completed, but this is probably not ideal since things will block during the handshake.