wuss 2.0.1.8 → 2.0.1.9
raw patch · 8 files changed
+113/−120 lines, 8 filesdep +data-defaultdep ~basedep ~bytestringdep ~crypton-connectionPVP ok
version bump matches the API change (PVP)
Dependencies added: data-default
Dependency ranges changed: base, bytestring, crypton-connection, exceptions, network, websockets
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +0/−4
- CHANGELOG.md +4/−0
- LICENSE.markdown +0/−21
- LICENSE.txt +21/−0
- README.markdown +0/−75
- README.md +71/−0
- source/library/Wuss.hs +2/−7
- wuss.cabal +15/−13
− CHANGELOG.markdown
@@ -1,4 +0,0 @@-# Change log--Wuss follows the [Package Versioning Policy](https://pvp.haskell.org).-You can find release notes [on GitHub](https://github.com/tfausak/wuss/releases).
+ CHANGELOG.md view
@@ -0,0 +1,4 @@+# Change log++Wuss follows the [Package Versioning Policy](https://pvp.haskell.org).+You can find release notes [on GitHub](https://github.com/tfausak/wuss/releases).
− LICENSE.markdown
@@ -1,21 +0,0 @@-MIT License--Copyright (c) 2023 Taylor Fausak--Permission is hereby granted, free of charge, to any person obtaining a copy-of this software and associated documentation files (the "Software"), to deal-in the Software without restriction, including without limitation the rights-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell-copies of the Software, and to permit persons to whom the Software is-furnished to do so, subject to the following conditions:--The above copyright notice and this permission notice shall be included in all-copies or substantial portions of the Software.--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE-SOFTWARE.
+ LICENSE.txt view
@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2023 Taylor Fausak++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
− README.markdown
@@ -1,75 +0,0 @@-# Wuss--[](https://github.com/tfausak/wuss/actions/workflows/workflow.yaml)-[](https://hackage.haskell.org/package/wuss)-[](https://www.stackage.org/package/wuss)--Secure WebSocket (WSS) clients in Haskell.-------Wuss is a library that lets you easily create secure WebSocket clients over the-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)--## Installation--To add Wuss as a dependency to your package, add it to your Cabal file.--```-build-depends: wuss-```--For other use cases, install it with Cabal.--``` sh-$ cabal install wuss-```--Wuss uses [Semantic Versioning][]. See [the change log][] for a detailed list-of changes.--## Usage--``` hs-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!")-```--For more information about Wuss, please read [the Haddock documentation][].--[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
+ README.md view
@@ -0,0 +1,71 @@+# Wuss++[](https://github.com/tfausak/wuss/actions/workflows/ci.yml)+[](https://hackage.haskell.org/package/wuss)++Secure WebSocket (WSS) clients in Haskell.++---++Wuss is a library that lets you easily create secure WebSocket clients over the+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)++## Installation++To add Wuss as a dependency to your package, add it to your Cabal file.++```+build-depends: wuss+```++For other use cases, install it with Cabal.++``` sh+$ cabal install wuss+```++## Usage++``` hs+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!")+```++For more information about Wuss, please read [the Haddock documentation][].++[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
source/library/Wuss.hs view
@@ -56,9 +56,9 @@ import qualified Control.Exception as Exception import qualified Control.Monad.Catch as Catch import qualified Control.Monad.IO.Class as MonadIO-import qualified Data.Bool as Bool import qualified Data.ByteString as StrictBytes import qualified Data.ByteString.Lazy as LazyBytes+import qualified Data.Default as Default import qualified Data.Maybe as Maybe import qualified Data.String as String import qualified Network.Connection as Connection@@ -203,12 +203,7 @@ } tlsSettings :: Connection.TLSSettings-tlsSettings = do- Connection.TLSSettingsSimple- { Connection.settingDisableCertificateValidation = Bool.False,- Connection.settingDisableSession = Bool.False,- Connection.settingUseServerName = Bool.False- }+tlsSettings = Default.def reader :: Config ->
wuss.cabal view
@@ -1,8 +1,6 @@ cabal-version: 2.2- name: wuss-version: 2.0.1.8-+version: 2.0.1.9 synopsis: Secure WebSocket (WSS) clients description: Wuss is a library that lets you easily create secure WebSocket clients over@@ -15,8 +13,11 @@ build-type: Simple category: Network-extra-source-files: CHANGELOG.markdown README.markdown-license-file: LICENSE.markdown+extra-doc-files:+ CHANGELOG.md+ README.md++license-file: LICENSE.txt license: MIT maintainer: Taylor Fausak @@ -26,17 +27,18 @@ flag pedantic default: False- description: Enables @-Werror@, which turns warnings into errors. manual: True common library+ build-depends: base ^>=4.18.0.0 || ^>=4.19.0.0 || ^>=4.20.0.0 build-depends:- , base >= 4.16.0 && < 4.20- , bytestring >= 0.11.3 && < 0.13- , crypton-connection >= 0.3.1 && < 0.4- , exceptions >= 0.10.4 && < 0.11- , network >= 3.1.2 && < 3.3- , websockets >= 0.12.7 && < 0.14+ bytestring ^>=0.11.4.0 || ^>=0.12.0.2,+ crypton-connection ^>=0.3.2 || ^>=0.4.0,+ data-default ^>=0.7.1.1,+ exceptions ^>=0.10.7,+ network ^>=3.1.4.0 || ^>=3.2.0.0,+ websockets ^>=0.12.7.3 || ^>=0.13.0.0,+ default-language: Haskell2010 ghc-options: -Weverything@@ -51,6 +53,6 @@ library import: library-+ -- cabal-gild: discover source/library exposed-modules: Wuss hs-source-dirs: source/library