network-conduit-tls-1.0.1: Create TLS-aware network code with conduits

Safe HaskellNone

Data.Conduit.Network.TLS

Synopsis

Documentation

tlsConfigSource

Arguments

:: HostPreference 
-> Int

port

-> FilePath

certificate

-> FilePath

key

-> TLSConfig 

tlsAppDataSource

Arguments

:: Context

a TLS context

-> SockAddr

remote address

-> Maybe SockAddr

local address

-> AppData IO 

Create an AppData from an existing tls Context value. This is a lower level function, allowing you to create a connection in any way you want.

Sample usage:

 import Network.Simple.TCP.TLS

 myapp :: Application IO
 ...
 main = do
     cset <- getDefaultClientSettings
     connect cset "host" "port" $
         (\(ctx, addr) -> myapp $ tlsAppData ctx addr Nothing)

Since 1.0.1