homepage: https://github.com/3kyro/keep-alive#readme
changelog-type: markdown
hash: 14704cf03da8f4567c169f8decd8e1903563a6b832cecfe971fee7f6ef9cc283
test-bench-deps:
  base: '>=4.7 && <5'
  keep-alive: -any
maintainer: papachrysanthou.k@gmail.com
synopsis: TCP keep alive implementation
changelog: |
  # Changelog for keep-alive

  ## Unreleased changes
basic-deps:
  base: '>=4.7 && <5'
all-versions:
- 0.1.0.0
author: Kyriakos Papachrysanthou
latest: 0.1.0.0
description-type: markdown
description: |
  # keep-alive

  This module allows you to set per-connection keep alive parameters on windows and linux enviroments.
  For more information on keep alive signals see <https://en.wikipedia.org/wiki/Keepalive>.
  See also <https://tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/> for a linux specific implementation.

  The module is meant to be used in conjuction with the "network" package. However, in order to ensure adaptability, all functions require
  a socket file descriptor instead of an implementation dependent socket type. For the network package, such a  descriptor can be obtained
  with the withFdSocket function:

  ```hs
   -- sock is a Socket type
   withFdSocket sock $ \fd -> do
      before <- getKeepAliveOnOff fd
      print before -- False
      -- set keep alive on, idle 60 seconds, interval 2 seconds
      rlt <- setKeepAlive fd $ KeepAlive True 60 2
      case rlt of
          Left err -> print err
          Right () -> return ()
      after <- getKeepAliveOnOff fd
      print after -- True
  ```

  Please note that only the envocing process can manipulate sockets based on their file descriptors.
license-name: BSD-3-Clause

Update from Hackage at 2020-10-22T20:40:08Z
Update from Hackage at 2020-10-22T20:40:08Z
