-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Haskell High Performance Programming
By :

The libraries in this subsection are as follows:
network (module Network)
and network-uri
: Low-level networking on bare sockets
connection
: Easy-to-use abstraction on TCP connections. Supports TLS and HTTP or SOCKS proxies out of the box.
Basic low-level networking using the network
package has been discussed in Chapter 6, I/O and Streaming.
For a bit higher-level TCP client communication, the connection
package provides a nice little abstraction layer. Plus, connection
supports SSL/TLS and SOCKS with minimal configuration. A connection is established primarily by defining a configuration value of type ConnectionParams
, given by:
data ConnectionParams = ConnectionParams { connectionHostname :: HostName , connectionPort :: PortNumber , connectionUseSecure :: Maybe TLSSettings , connectionUseSocks :: Maybe ProxySettings }
This is a simple yet effective API for all primitive TCP connections. The get
and put
operations use ByteString as data format. connection
...