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,KashyapOn Sun, Feb 24, 2013 at 3:42 AM, Vincent Hanquez <tab@snarc.org> wrote:
On 02/23/2013 06:58 PM, C K Kashyap wrote:Kashyap,
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
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
[2] <https://github.com/vincenthz/hs-connection>https://github.com/vincenthz/hs-connection/tree/master/examples
[3] https://github.com/vincenthz/hs-connection/blob/master/Network/Connection.hs
[4] https://github.com/vincenthz/hs-tls/tree/master/debug/src
--
Vincent