box-socket: Box websockets

[ bsd3, library, program, web ] [ Propose Tags ] [ Report a vulnerability ]

Websockets built with the box library.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.1.1, 0.1.2, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.5.0.0, 0.5.1.0, 0.5.2.0
Change log ChangeLog.md
Dependencies async (>=2.2.3 && <2.3), base (>=4.14 && <5), box (>=0.9.3 && <0.10), box-socket, bytestring (>=0.11.3 && <0.13), network-simple (>=0.4 && <0.5), optparse-applicative (>=0.17 && <0.19), profunctors (>=5.6 && <5.7), text (>=1.2 && <2.2), websockets (>=0.12 && <0.14) [details]
Tested with ghc ==9.10.1, ghc ==9.6.5, ghc ==9.8.2
License BSD-3-Clause
Copyright Tony Day (c) 2017
Author Tony Day
Maintainer tonyday567@gmail.com
Category web
Home page https://github.com/tonyday567/box-socket#readme
Bug tracker https://github.com/tonyday567/box-socket/issues
Source repo head: git clone https://github.com/tonyday567/box-socket
Uploaded by tonyday567 at 2024-10-12T08:26:25Z
Distributions LTSHaskell:0.5.2.0, NixOS:0.5.2.0, Stackage:0.5.2.0
Reverse Dependencies 2 direct, 7 indirect [details]
Executables box-socket
Downloads 1194 total (33 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-10-20 [all 1 reports]

Readme for box-socket-0.5.2.0

[back to package description]

Table of Contents

  1. Usage
  2. Design

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.