[Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

Mads Lindstrøm mads.lindstroem at gmail.com
Thu Dec 16 22:51:27 CET 2010


Hi Antoine

> On Thu, Dec 16, 2010 at 2:38 PM, Mads Lindstrøm
> Maybe a better interface would be along the lines of:
> 
> -- | Do not use the handle when you are done!
> openTLSConnection: Handle -> { information? Maybe not needed} -> IO
> TLSConnection
> 
> And then some thread-safe operations on the TLSConnection:
> 
> recv :: TLSConnection -> Int -> IO ByteString
> send :: TLSConnection -> ByteString -> IO ()
> 

Or it could be:

openTLSConnection: Handle -> { Certificates & private key} -> IO Handle

the returned handle would then act like a normal handle, except that it
would encrypt and decrypt data. But I do not know if it is possible to
implement that.


/Mads




More information about the Haskell-Cafe mailing list