@hackage sockets0.3.0.0

High-level network sockets

  • Installation

  • Dependencies (6)

  • Dependents (0)

  • Package Flags

      mmsg
       (off by default)

      Use sendmmsg and recvmmsg

      debug
       (off by default)

      Print debug output

      example
       (off by default)

      Build example executables

This library provides a high-level abstraction for network sockets. It uses Haskell2010 (along with GADTs) without typeclasses to ensure that consumers of the API can only call appropriate functions on a socket. Exceptions are tracked in the types of functions and returned to the caller with Either. The caller is free to handle these gracefully or to throw them. This library only throws exceptions when it detects that it has misused the operating system's sockets API (open an issue for this) or when the caller asks for a negatively-sized slice of a buffer (such exceptions are unrecoverable and indicate a mistake in the code consuming this API).