[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] Problem with OpenSSL and file descriptors (sendfi
Re: [Chicken-hackers] Problem with OpenSSL and file descriptors (sendfile)
Sun, 4 Jul 2010 14:59:14 +0200
2010/7/4 Peter Bex <address@hidden>:
> Here's a patch that uses the reserved slots to store the tcp ports,
> which can then be used to pass to tcp-addresses. This makes Spiffy's
> HTTPS work properly. Are you okay with this, Thomas?
this looks alright to me. I have three small remarks:
* I would suggest renaming ssl-port->tcp-fd into ssl-port->tcp-port,
since it doesn't return a file descriptor, but rather another
* I think ssl-port->tcp-port should be exported from the openssl
module. That way it would be possible for client code to call
(port->fileno (ssl-port->tcp-port ...)) and use the result in a
call to file-select or some other low level status inquiry that
requires a file descriptor, which may be useful.
* To avoid code duplication I would consider replacing the manual
definition of ensure-ssl-port with a use of the check-errors egg,
ie. to write (define-check+error-type ssl-port), export
check-ssl-port and error-ssl-port as well as ssl-port? and use
check-ssl-port instead of ensure-ssl-port.
When C++ is your hammer, every problem looks like your thumb.