About

Metadata

  • Last updated , by tonyday567
  • License BSD-3-Clause
  • Maintained by: tonyday567@gmail.com

  • Lottery factor: 1

Links

Installation

Tested Compilers

  1. 9.12.2
  2. 9.10.2

Readme

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.