BSD-3-Clause licensed by Tony Day
Maintained by [email protected]
This version can be pinned in stack with:box-socket-0.5.3.0@sha256:13c5a1741bf19f4b666927f70b396d048bb62b7d701f40cc12a2a0d9b014d349,1989

Module documentation for 0.5.3.0

img img

Socket API based on the box library, with websockets and TCP support.

Usage

:set -XOverloadedStrings
import Box
import Box.Socket.Types
import Box.Websocket

IO client:

clientBox defaultSocketConfig (CloseAfter 0) (stdBox "q")

IO server:

serverBox defaultSocketConfig (CloseAfter 0) (stdBox "q")

See examples in Box.Websocket.Example and Box.TCP.Example for a variety of usage.

Design

  • The API attempts to be similar for TCP and Websocket

  • A Codensity, continuation passing style is encouraged, similar to the box library.

Changes

0.5.2

  • dependency bumps for 9.10

0.5

  • complete refactor

  • aligned TCP api with Websockets

  • Action & Codensity-based API surface