assumpta-0.1.0.0: An SMTP client library

Safe HaskellNone
LanguageHaskell2010

Network.Mail.Assumpta.Internal.Net

Description

Network operations using the connection package.

Synopsis

Documentation

type Port = Int Source #

data Handle Source #

Network handle, containing enough information to both communicate a connection, and upgrade to TLS.

Constructors

Handle 
Instances
Connection Handle Source # 
Instance details

Defined in Network.Mail.Assumpta.Internal.Net

Associated Types

type Cstrt Handle :: (* -> *) -> Constraint #

type Params Handle :: * #

Methods

open :: Cstrt Handle m => Params Handle -> m Handle #

close :: Cstrt Handle m => Handle -> m () #

send :: Cstrt Handle m => Handle -> ByteString -> m () #

recv :: Cstrt Handle m => Handle -> m ByteString #

upgrade :: Cstrt Handle m => Handle -> m () #

type Params Handle Source # 
Instance details

Defined in Network.Mail.Assumpta.Internal.Net

type Cstrt Handle Source # 
Instance details

Defined in Network.Mail.Assumpta.Internal.Net

defaultTLSSettings :: TLSSettings Source #

default TLS settings

openParams :: MonadIO m => ConnectionParams -> m Handle Source #

Open a network Handle with the specified ConnectionParams

open :: MonadIO m => HostName -> Port -> m Handle Source #

Open a network Handle to the specified hostname and port

openTls :: MonadIO m => HostName -> Port -> m Handle Source #

Open a secure network Handle to the specified hostname and port using the default TLS settings (defaultTLSSettings)

close :: MonadIO m => Handle -> m () Source #

Close a network Handle

withHandleParams :: (MonadMask m, MonadIO m) => ConnectionParams -> (Handle -> m b) -> m b Source #

withHandleParams p a

Given some parameters p (hostname, port etc) for opening a Handle: open a handle, run some action a with it, then close.

withHandle :: (MonadMask m, MonadIO m) => HostName -> Port -> (Handle -> m b) -> m b Source #

withHandle hostname port a

Open a Handle to the specified hostname and port, run some action a with it, then close.

withSecureHandle :: (MonadMask m, MonadIO m) => HostName -> Port -> (Handle -> m b) -> m b Source #

withSecureHandle hostname port a

Open a secure Handle to the specified hostname and port, run some action a with it, then close.