BSD-3-Clause licensed by Duncan Coutts, Nicolas Wu, Edsko de Vries
Maintained by Facundo Domínguez

Module documentation for 0.5.4

Network.Transport is a Network Abstraction Layer which provides the following high-level concepts:

  • Nodes in the network are represented by EndPoints. These are heavyweight stateful objects.

  • Each EndPoint has an EndPointAddress.

  • Connections can be established from one EndPoint to another using the EndPointAddress of the remote end.

  • The EndPointAddress can be serialised and sent over the network, whereas EndPoints and connections cannot.

  • Connections between EndPoints are unidirectional and lightweight.

  • Outgoing messages are sent via a Connection object that represents the sending end of the connection.

  • Incoming messages for all of the incoming connections on an EndPoint are collected via a shared receive queue.

  • In addition to incoming messages, EndPoints are notified of other Events such as new connections or broken connections.

This design was heavily influenced by the design of the Common Communication Interface ( Important design goals are:

  • Connections should be lightweight: it should be no problem to create thousands of connections between endpoints.

  • Error handling is explicit: every function declares as part of its type which errors it can return (no exceptions are thrown)

  • Error handling is "abstract": errors that originate from implementation specific problems (such as "no more sockets" in the TCP implementation) get mapped to generic errors ("insufficient resources") at the Transport level.

This package provides the generic interface only; you will probably also want to install at least one transport implementation (network-transport-*).


2019-05-12 Facundo Domínguez <> 0.5.4

* Fix documentation typo (#39).

2019-05-12 Facundo Domínguez <> 0.5.3

* Relax upper bound of hashable.

2017-07-25 Facundo Domínguez <> 0.5.2

* prependLength checks for overflow (5608f0f)
* Drop inlinePerformIO for unsafeDupablePerformIO (18bf80c)
* Have travis build n-t even with no tests (7ffe43e)

2017-02-23 Facundo Domínguez <> 0.5.1

* Add {encode|decode}{Word|Enum|Num}{32|16}.
* Removed {encode|decode}Int{32|16}

2016-01-28 Facundo Domínguez <>

* Add compatibility with ghc-8.

2016-01-28 Facundo Domínguez <>

* Derive Binary instances for missing types.
* Use auto-derive for Reliability as Binary instance.
* Stop testing with ghc-7.4 and build with ghc-7.10.

2015-06-15 Facundo Domínguez <>

* Add NFData instance for EndPointAddress.
* Relax dependency bounds.

2014-12-09 Tim Watson <>

* foreigns htonl, ntohl, htons, ntohs are imported from ws2_32 on windows
* Created Data instance for EndPointAddress (thanks Andrew Rademacher)

2014-05-30 Tim Watson <>

* Fix build for GHC 7.4 - thanks mboes!
* Allow transformers above v5
* Bump binary version to include 0.7.*
* Binary instance for 'Reliability' - thanks mboes!
* Hashable instance for 'EndPointAddress'

2012-11-22 Edsko de Vries <>

* Relax bounds on Binary

2012-10-03 Edsko de Vries <> 0.3.0

* Clarify disconnection
* Require that 'connect' be "as asynchronous as possible"
* Added strictness annotations

2012-07-16 Edsko de Vries <>

* Base 4.6 compatible test suites
* Relax package constraints for bytestring

2012-07-16 Edsko de Vries <>

* Hide catch only for base < 4.6

2012-07-07 Edsko de Vries <> 0.2.0

* Initial release.
comments powered byDisqus