Network.Protocol.TLS.GNU

gnutls-0.2: Bindings for GNU libgnutls

Safe Haskell | None
Language | Haskell98

Network.Protocol.TLS.GNU

Contents

- Settings

Synopsis

- data TLS a
- data Session
- data Error = Error Integer
- runTLS :: Session -> TLS a -> IO (Either Error a)
- runClient :: Transport -> TLS a -> IO (Either Error a)
- getSession :: TLS Session
- handshake :: TLS ()
- rehandshake :: TLS ()
- putBytes :: ByteString -> TLS ()
- getBytes :: Integer -> TLS ByteString
- checkPending :: TLS Integer
- data Transport = Transport {
  - transportPush :: ByteString -> IO ()
  - transportPull :: Integer -> IO ByteString
  }
- handleTransport :: Handle -> Transport
- data Credentials
- setCredentials :: Credentials -> TLS ()
- certificateCredentials :: TLS Credentials

# Documentation

data TLS a #

Instances

Monad TLS # |
Methods (>>=) :: TLS a -> (a -> TLS b) -> TLS b # (>>) :: TLS a -> TLS b -> TLS b # return :: a -> TLS a # fail :: String -> TLS a #
Functor TLS # |
Methods fmap :: (a -> b) -> TLS a -> TLS b # (<$) :: a -> TLS b -> TLS a #
Applicative TLS # |
Methods pure :: a -> TLS a # (<*>) :: TLS (a -> b) -> TLS a -> TLS b # (*>) :: TLS a -> TLS b -> TLS b # (<*) :: TLS a -> TLS b -> TLS a #
MonadIO TLS # |
Methods liftIO :: IO a -> TLS a #
MonadError TLS # |
Associated Types type ErrorType (TLS :: * -> *) :: * # Methods throwError :: ErrorType TLS -> TLS a # catchError :: TLS a -> (ErrorType TLS -> TLS a) -> TLS a #
type ErrorType TLS # |
type ErrorType TLS = Error

data Session #

data Error #

Constructors

Error Integer |

Instances

Show Error # |
Methods showsPrec :: Int -> Error -> ShowS # show :: Error -> String # showList :: [Error] -> ShowS #

runTLS :: Session -> TLS a -> IO (Either Error a) #

runClient :: Transport -> TLS a -> IO (Either Error a) #

getSession :: TLS Session #

handshake :: TLS () #

rehandshake :: TLS () #

putBytes :: ByteString -> TLS () #

getBytes :: Integer -> TLS ByteString #

checkPending :: TLS Integer #

# Settings

data Transport #

Constructors

Transport |
Fields transportPush :: ByteString -> IO () transportPull :: Integer -> IO ByteString

handleTransport :: Handle -> Transport #

data Credentials #

setCredentials :: Credentials -> TLS () #

certificateCredentials :: TLS Credentials #