[plt-scheme] ssl/tls connections

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 31 12:48:13 EDT 2009

At Tue, 31 Mar 2009 13:55:15 +0100, Noel Welsh wrote:
> Try syncing on the input and output ports, rather than peeking. I
> don't know for sure but I guess that sync is implemented in terms of
> select, and the OpenSSL docs suggest you can use select to determine
> if data is ready without committing to a read or a write.

No, I think that's not the case. Socket-level data may just mean that
the other end started a negotiation about the protocol and doesn't
intend to send any payload.

After paging back in, I'm sure I've looked at this a couple of times
before, and I always conclude as the `openssl' library docs say: you
can't even ask whether the other end has provided data (though
`char-ready?', `sync' or other means) without committing to reading
data. I'm fairly certain that this is a limitation of the OpenSSL
protocol. (Of course, if anyone knows otherwise and can point me to the
right OpenSSL library functions, I'd be happy to improve the `openssl'

Posted on the users mailing list.