packages feed

wuss 1.0.0 → 1.0.1

raw patch · 4 files changed

+79/−24 lines, 4 filesdep ~doctest

Dependency ranges changed: doctest

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # Change log +Wuss uses [Semantic Versioning][].++## v1.0.1 (2015-06-04)++-   Improved documentation.+-   Supported doctest 0.10.+ ## v1.0.0 (2015-04-15)  -   Initially released.@@ -7,3 +14,5 @@ ## v0.0.0 (2015-04-15)  -   Initially created.++[semantic versioning]: http://semver.org/spec/v2.0.0.html
README.md view
@@ -1,23 +1,17 @@-<h1 align="center">-    <a href="http://taylor.fausak.me/wuss/">-        Wuss-    </a>-</h1>+# [Wuss][] -<p align="center">-    Secure WebSocket (WSS) clients in Haskell.-</p>+Secure WebSocket (WSS) clients in Haskell. -<p align="center">-    <a href="https://hackage.haskell.org/package/wuss"><img alt="Version" src="https://img.shields.io/hackage/v/wuss.svg?label=version&amp;style=flat-square"></a>-    <a href="https://travis-ci.org/tfausak/wuss"><img alt="Build" src="https://img.shields.io/travis/tfausak/wuss/master.svg?label=build&amp;style=flat-square"></a>-    <a href="http://packdeps.haskellers.com/feed?needle=wuss"><img alt="Dependencies" src="https://img.shields.io/hackage-deps/v/wuss.svg?label=dependencies&amp;style=flat-square"></a>-</p>+[![Version][]](https://hackage.haskell.org/package/wuss)+[![Build][]](https://travis-ci.org/tfausak/wuss)+[![Dependencies][]](http://packdeps.haskellers.com/feed?needle=wuss) -<hr>+---  Wuss is a library that lets you easily create secure WebSocket clients over the-WSS protocol.+WSS protocol. It is a small addition to [the `websockets` package][] and is+adapted from existing solutions by [@jaspervdj][], [@mpickering][], and+[@elfenlaid][].  -   [Installation](#installation) -   [Usage](#usage)@@ -27,13 +21,13 @@ To add Wuss as a dependency to your package, add it to your Cabal file.  ```-build-depends: wuss ==1.*+build-depends: wuss ==1.0.* ```  For other use cases, install it with Cabal.  ``` sh-$ cabal install 'wuss ==1.*'+$ cabal install 'wuss ==1.0.*' ```  Wuss uses [Semantic Versioning][]. See [the change log][] for a detailed list@@ -72,6 +66,14 @@  For more information about Wuss, please read [the Haddock documentation][]. +[wuss]: http://taylor.fausak.me/wuss/+[version]: https://img.shields.io/hackage/v/wuss.svg?label=version&amp;style=flat-square+[build]: https://img.shields.io/travis/tfausak/wuss/master.svg?label=build&amp;style=flat-square+[dependencies]: https://img.shields.io/hackage-deps/v/wuss.svg?label=dependencies&amp;style=flat-square+[the `websockets` package]: https://hackage.haskell.org/package/websockets+[@jaspervdj]: https://gist.github.com/jaspervdj/7198388+[@mpickering]: https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3+[@elfenlaid]: https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767 [semantic versioning]: http://semver.org/spec/v2.0.0.html [the change log]: CHANGELOG.md [the haddock documentation]: https://hackage.haskell.org/package/wuss
Wuss.hs view
@@ -1,3 +1,41 @@+{- |+    Wuss is a library that lets you easily create secure WebSocket clients over+    the WSS protocol. It is a small addition to+    <https://hackage.haskell.org/package/websockets the websockets package>+    and is adapted from existing solutions by+    <https://gist.github.com/jaspervdj/7198388 @jaspervdj>,+    <https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3 @mpickering>, and+    <https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767 @elfenlaid>.++    == Example++    > import Wuss+    >+    > import Control.Concurrent (forkIO)+    > import Control.Monad (forever, unless, void)+    > import Data.Text (Text, pack)+    > import Network.WebSockets (ClientApp, receiveData, sendClose, sendTextData)+    >+    > main :: IO ()+    > main = runSecureClient "echo.websocket.org" 443 "/" ws+    >+    > ws :: ClientApp ()+    > ws connection = do+    >     putStrLn "Connected!"+    >+    >     void . forkIO . forever $ do+    >         message <- receiveData connection+    >         print (message :: Text)+    >+    >     let loop = do+    >             line <- getLine+    >             unless (null line) $ do+    >                 sendTextData connection (pack line)+    >                 loop+    >     loop+    >+    >     sendClose connection (pack "Bye!")+-} module Wuss     ( runSecureClient     , runSecureClientWith@@ -14,6 +52,8 @@ import Network.WebSockets.Stream (makeStream)  {- |+    A secure replacement for 'Network.WebSockets.runClient'.+     >>> let app _connection = return ()     >>> runSecureClient "echo.websocket.org" 443 "/" app -}@@ -29,6 +69,8 @@     in  runSecureClientWith host port path options headers app  {- |+    A secure replacement for 'Network.WebSockets.runClientWith'.+     >>> let options = defaultConnectionOptions     >>> let headers = []     >>> let app _connection = return ()
wuss.cabal view
@@ -1,5 +1,5 @@ name: wuss-version: 1.0.0+version: 1.0.1 cabal-version: >=1.10 build-type: Simple license: MIT@@ -11,10 +11,12 @@ synopsis: Secure WebSocket (WSS) clients description:     Wuss is a library that lets you easily create secure WebSocket clients over-    the WSS protocol.-    .-    Please read <https://github.com/tfausak/wuss#readme the readme> for example-    usage.+    the WSS protocol. It is a small addition to+    <https://hackage.haskell.org/package/websockets the websockets package>+    and is adapted from existing solutions by+    <https://gist.github.com/jaspervdj/7198388 @jaspervdj>,+    <https://gist.github.com/mpickering/f1b7ba3190a4bb5884f3 @mpickering>, and+    <https://gist.github.com/elfenlaid/7b5c28065e67e4cf0767 @elfenlaid>. category: Network author: Taylor Fausak <taylor@fausak.me> extra-source-files:@@ -42,7 +44,7 @@     main-is: WussTest.hs     build-depends:         base -any,-        doctest ==0.9.*,+        doctest >=0.9 && <0.11,         wuss -any     default-language: Haskell2010-    ghc-options: -Wall -Werror+    ghc-options: -Wall