Skip to content

Commit

Permalink
Revamp README and remove website (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar authored Dec 22, 2023
1 parent da1fd1d commit e0ac03d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 240 deletions.
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
websockets
==========
# websockets

Introduction
------------
![Hackage Version](https://img.shields.io/hackage/v/websockets)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/jaspervdj/websockets/ci.yml)

Provides a sensible, clean and simple way to write WebSocket-capable servers in
Haskell.
Provides a sensible, clean and simple way to write WebSocket
server and client in Haskell.

The following program echoes messages back after appending `meow`:
## Features

```haskell
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad (forever)
import qualified Data.Text as T
import qualified Network.WebSockets as WS
- Provides Server/Client implementations of the websocket protocol
- Ping/Pong building blocks for stale connection checking
- TLS support via [wuss](https://hackage.haskell.org/package/wuss) package

meow :: WS.Connection -> IO ()
meow conn = forever $ do
msg <- WS.receiveData conn
WS.sendTextData conn $ msg `T.append` ", meow"
```
## Caveats

- [Doesn't implement client ping/pong](https://github.com/jaspervdj/websockets/issues/159)
- [Send doesn't support streaming](https://github.com/jaspervdj/websockets/issues/119)
- [Requires careful handling of exceptions](https://github.com/jaspervdj/websockets/issues/48)
- [DeflateCompression isn't thread-safe](https://github.com/jaspervdj/websockets/issues/208)

## Introduction

See [server](./example/server.lhs) and [client](./example/client.hs) implementations.

## Installation

Installation is provided using cabal:
Using cabal:

```
$ cabal install websockets
```

Authors
-------
## Authors

An initial WebSockets library was written in 2010 by Siniša Biđin. In 2011, it
was rewritten from scratch, and extended to its current state by Jasper Van der
Expand All @@ -43,9 +46,9 @@ Contributors:
- Nathan Howell
- Steffen Schuldenzucker
- Yi Huang
- Domen Kožar

Development
-----------
## Development

Pull requests are always welcome!

Expand Down
1 change: 0 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ save-hackage-creds: false
flags:
websockets:
example: true
website: true
extra-deps:
- 'hakyll-4.15.1.0'
nix:
Expand Down
7 changes: 0 additions & 7 deletions web/.gitignore

This file was deleted.

83 changes: 0 additions & 83 deletions web/css/default.css

This file was deleted.

18 changes: 0 additions & 18 deletions web/css/syntax.css

This file was deleted.

59 changes: 0 additions & 59 deletions web/site.hs

This file was deleted.

33 changes: 0 additions & 33 deletions web/templates/default.html

This file was deleted.

17 changes: 0 additions & 17 deletions websockets.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ Flag Example
Default: False
Manual: True

Flag Website
Description: Build the website
Default: False
Manual: True

Library
Hs-source-dirs: src
Ghc-options: -Wall
Expand Down Expand Up @@ -243,15 +238,3 @@ Benchmark bench-mask
SHA >= 1.5 && < 1.7,
text >= 0.10 && < 2.2,
entropy >= 0.2.1 && < 0.5

Executable websockets-website
If !flag(Website)
Buildable: False

Main-is: site.hs
Hs-source-dirs: web
Default-language: Haskell2010
Build-depends:
base >= 4 && < 5,
filepath >= 1.4 && < 1.5,
hakyll >= 4.15 && < 4.16

0 comments on commit e0ac03d

Please sign in to comment.