
On Fri, Oct 08, 2010 at 12:59:56PM +0100, Maciej Piechotka wrote:
1. Could also callback in addition to handles be added? Like:
connect' :: (ByteString -> IO ()) -> IO ByteString -> TLSClient IO ()
Would an interface that generate the packet to send and just return them as bytes be even better ? connect' :: TLSClient () ByteString I'm hoping to have something like that so i can use quickcheck to verify that all possible configurations result in a workable connection.
2. Does listen corresponds to listen(2)? If yes how to handle STARTTLS server-side? If no - please rename it.
it's not doing the same thing as the socket listen(2). it waits for the handle passed as argument to establish a new TLS session as in: listen to the new tls connection. after reading STARTTLS, you would call listen that would listen for the TLS context to be established. Please suggest something, if you want me to rename it though, as I can't really think of a better name. -- Vincent Hanquez