[Haskell-cafe] Re: ANNOUNCE: tls,
native TLS/SSL protocol implementation
Maciej Piechotka
uzytkownik2 at gmail.com
Sun Oct 10 09:09:37 EDT 2010
On 10/10/10, Michael Snoyman <michael at snoyman.com> wrote:
> On Fri, Oct 8, 2010 at 3:29 PM, Maciej Piechotka <uzytkownik2 at gmail.com>
> wrote:
>>
>> I had in mind something like:
>>
>> import Data.ByteString
>> import Data.Iteratee
>>
>> clientEnum :: MonadIO m
>> => params
>> -> Enumerator ByteString m a
>> -> Enumerator ByteString m a
>> clientEnum params client = ...
>>
>> i.e.
>>
>> clientEnum :: MonadIO m
>> => params
>> -> (Iteratee ByteString m a -> m (Iteratee ByteString m a))
>> -- ^ Client function
>> -> Iteratee ByteString m a --^ "Output"
>> -> m (Iteratee ByteString m a) --^ "Input"
>>
>> Where inner enumerator is simply a client side while 'outer' is a
>> outside/server part.
>>
>> Regards
>>
>
> I'm afraid I haven't really looked at iteratee 0.4 enough to
> understand those type signatures completely, but it looks pretty
> similar to the API I have. Am I missing something? And is there a
> reason you can't implement that against the current tls API?
>
> Michael
>
Yes as far as I understend. My signature is parametrized both in
client side of protocol as well as "native". I.e. in my signature you
don't need to have any Handle but the encrypted output is simply
passed to next iteratee.
Regards
More information about the Haskell-Cafe
mailing list