simplexmq-6.5.0.16: SimpleXMQ message broker
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simplex.Messaging.Transport.Client

Synopsis

Documentation

runTransportClient :: Transport c => TransportClientConfig -> Maybe SocksCredentials -> TransportHost -> ServiceName -> Maybe KeyHash -> (c 'TClient -> IO a) -> IO a Source #

Connect to passed TCP host:port and pass handle to the client.

runTLSTransportClient :: Transport c => Supported -> Maybe CertificateStore -> TransportClientConfig -> Maybe SocksCredentials -> TransportHost -> ServiceName -> Maybe KeyHash -> (c 'TClient -> IO a) -> IO a Source #

defaultSMPPort :: PortNumber Source #

defaultSocksHost :: (Word8, Word8, Word8, Word8) Source #

data TransportClientConfig Source #

Constructors

TransportClientConfig 

Fields

newtype SocksProxy Source #

Constructors

SocksProxy SockAddr 

Instances

Instances details
Show SocksProxy Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

showsPrec :: Int -> SocksProxy -> ShowS

show :: SocksProxy -> String

showList :: [SocksProxy] -> ShowS

Eq SocksProxy Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

(==) :: SocksProxy -> SocksProxy -> Bool

(/=) :: SocksProxy -> SocksProxy -> Bool

StrEncoding SocksProxy Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

strEncode :: SocksProxy -> ByteString Source #

strDecode :: ByteString -> Either String SocksProxy Source #

strP :: Parser SocksProxy Source #

data SocksAuth Source #

Constructors

SocksAuthUsername 

Fields

SocksAuthNull 
SocksIsolateByAuth 

Instances

Instances details
Show SocksAuth Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

showsPrec :: Int -> SocksAuth -> ShowS

show :: SocksAuth -> String

showList :: [SocksAuth] -> ShowS

Eq SocksAuth Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

(==) :: SocksAuth -> SocksAuth -> Bool

(/=) :: SocksAuth -> SocksAuth -> Bool

StrEncoding SocksAuth Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

strEncode :: SocksAuth -> ByteString Source #

strDecode :: ByteString -> Either String SocksAuth Source #

strP :: Parser SocksAuth Source #

data TransportHost Source #

Constructors

THIPv4 (Word8, Word8, Word8, Word8) 
THIPv6 (Word32, Word32, Word32, Word32) 
THOnionHost ByteString 
THDomainName HostName 

Instances

Instances details
FromJSON TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

parseJSON :: Value -> Parser TransportHost

parseJSONList :: Value -> Parser [TransportHost]

omittedField :: Maybe TransportHost

ToJSON TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

toJSON :: TransportHost -> Value

toEncoding :: TransportHost -> Encoding

toJSONList :: [TransportHost] -> Value

toEncodingList :: [TransportHost] -> Encoding

omitField :: TransportHost -> Bool

IsString TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

fromString :: String -> TransportHost

Show TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

showsPrec :: Int -> TransportHost -> ShowS

show :: TransportHost -> String

showList :: [TransportHost] -> ShowS

Eq TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Ord TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Encoding TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

smpEncode :: TransportHost -> ByteString Source #

smpDecode :: ByteString -> Either String TransportHost Source #

smpP :: Parser TransportHost Source #

StrEncoding TransportHost Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

strEncode :: TransportHost -> ByteString Source #

strDecode :: ByteString -> Either String TransportHost Source #

strP :: Parser TransportHost Source #

IsString (NonEmpty TransportHost) Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

fromString :: String -> NonEmpty TransportHost

FromField (NonEmpty TransportHost) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Store.AgentStore

Methods

fromField :: FieldParser (NonEmpty TransportHost) #

ToField (NonEmpty TransportHost) Source # 
Instance details

Defined in Simplex.Messaging.Agent.Store.AgentStore

Methods

toField :: NonEmpty TransportHost -> SQLData #

newtype TransportHosts Source #

Constructors

TransportHosts 

Fields

Instances

Instances details
StrEncoding TransportHosts Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

strEncode :: TransportHosts -> ByteString Source #

strDecode :: ByteString -> Either String TransportHosts Source #

strP :: Parser TransportHosts Source #

newtype TransportHosts_ Source #

Constructors

TransportHosts_ 

Fields

Instances

Instances details
StrEncoding TransportHosts_ Source # 
Instance details

Defined in Simplex.Messaging.Transport.Client

Methods

strEncode :: TransportHosts_ -> ByteString Source #

strDecode :: ByteString -> Either String TransportHosts_ Source #

strP :: Parser TransportHosts_ Source #

validateCertificateChain :: KeyHash -> HostName -> ByteString -> CertificateChain -> IO [FailedReason] Source #