Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp README and remove website #238

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -247,15 +242,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
Loading