[Haskell-cafe] Need urgent help with Network.tls

C K Kashyap ckkashyap at gmail.com
Sun Feb 24 05:33:08 CET 2013


Okay ... looks like connection is exactly what I want .... The examples
work just fine on Linux .. however, on Windows, I continue to get the
WSACONNECTIONREFUSED eror.

Even adding a "withSocketsDo" does not seem to help.

Regards,
Kashyap


On Sun, Feb 24, 2013 at 8:58 AM, C K Kashyap <ckkashyap at gmail.com> wrote:

> Thank you so much Vincent,
>
> I think this is what I need ... I tried to use it to connect to a local
> web server running in 443 - http://hpaste.org/82943 however, I get the
> following error -
>
> ssl_client.hs: connect: failed (Connection refused (WSAECONNREFUSED))
>
> Am I missing something?
>
> Regards,
> Kashyap
>
>
> On Sun, Feb 24, 2013 at 3:42 AM, Vincent Hanquez <tab at snarc.org> wrote:
>
>> On 02/23/2013 06:58 PM, C K Kashyap wrote:
>>
>>> The reason I want to use TLS is that I'd want to pack the whole thing in
>>> a
>>> DLL and give it off to a friend for use.
>>>
>>> What I am really looking for is a small sample code that demonstrates how
>>> TLS package can be used to connect to a webserver or imapserver.
>>>
>>> Regards,
>>> Kashyap
>>>
>>
>> Kashyap,
>>
>> I suggest you look at the connection package [1] which is made for this
>> specific purpose, and comes with examples on how to use it [2].
>>
>> If you want to only use tls, i suggest to look at connection's code [3],
>> or the tls-debug [4] package, which got many small utils that use tls.
>>
>> [1] http://hackage.haskell.org/**package/connection<http://hackage.haskell.org/package/connection>
>> [2] <https://github.com/vincenthz/**hs-connection<https://github.com/vincenthz/hs-connection>
>> >https://github.**com/vincenthz/hs-connection/**tree/master/examples<https://github.com/vincenthz/hs-connection/tree/master/examples>
>> [3] https://github.com/vincenthz/**hs-connection/blob/master/**
>> Network/Connection.hs<https://github.com/vincenthz/hs-connection/blob/master/Network/Connection.hs>
>> [4] https://github.com/vincenthz/**hs-tls/tree/master/debug/src<https://github.com/vincenthz/hs-tls/tree/master/debug/src>
>>
>> --
>> Vincent
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130224/47bf31e1/attachment.htm>


More information about the Haskell-Cafe mailing list