Safe Haskell | None |
---|
- data TLSConfig
- tlsConfig :: HostPreference -> Int -> FilePath -> FilePath -> TLSConfig
- tlsHost :: TLSConfig -> HostPreference
- tlsPort :: TLSConfig -> Int
- tlsCertificate :: TLSConfig -> FilePath
- tlsKey :: TLSConfig -> FilePath
- tlsNeedLocalAddr :: TLSConfig -> Bool
- tlsAppData :: Context -> SockAddr -> Maybe SockAddr -> AppData IO
- runTCPServerTLS :: TLSConfig -> Application IO -> IO ()
Documentation
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
runTCPServerTLS :: TLSConfig -> Application IO -> IO ()Source