connection-0.2.8: Simple and easy network connections API

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Network.Connection

Contents

Description

Simple connection abstraction

Synopsis

Type for a connection

data Connection Source #

This opaque type represent a connection to a destination.

connectionID :: Connection -> ConnectionID Source #

return a simple tuple of the port and hostname that we're connected to.

data ConnectionParams Source #

Connection Parameters to establish a Connection.

The strict minimum is an hostname and the port.

If you need to establish a TLS connection, you should make sure connectionUseSecure is correctly set.

If you need to connect through a SOCKS, you should make sure connectionUseSocks is correctly set.

Constructors

ConnectionParams 

Fields

data TLSSettings Source #

TLS Settings that can be either expressed as simple settings, or as full blown TLS.Params settings.

Unless you need access to parameters that are not accessible through the simple settings, you should use TLSSettingsSimple.

Constructors

TLSSettingsSimple

Simple TLS settings. recommended to use.

Fields

TLSSettings ClientParams

full blown TLS Settings directly using TLS.Params. for power users.

data ProxySettings Source #

Proxy settings for the connection.

OtherProxy handles specific application-level proxies like HTTP proxies.

The simple SOCKS settings is just the hostname and portnumber of the SOCKS proxy server.

That's for now the only settings in the SOCKS package, socks password, or any sort of other authentications is not yet implemented.

Exceptions

data LineTooLong Source #

This is the exception raised if we reached the user specified limit for the line in ConnectionGetLine.

Constructors

LineTooLong 

data HostNotResolved Source #

Exception raised when there's no resolution for a specific host

Constructors

HostNotResolved String