port-utils 0.1.0.2 → 0.1.0.3
raw patch · 2 files changed
+12/−11 lines, 2 files
Files
- README.md +4/−4
- port-utils.cabal +8/−7
README.md view
@@ -2,9 +2,9 @@ ## openFreePort -This is another version of `warp`'s `openFreePort` function. Nice if you don't already depend on `warp`.+This is another version of `warp`'s `openFreePort` function. This function has fewer dependencies than the `warp` version. -`openFreePort` returns a socket on random port and the port it has been bound to.+`openFreePort` returns a socket on a random port and the port it has been bound to. ```haskell openFreePort :: IO (Int, Socket)@@ -12,7 +12,7 @@ ## wait -`wait` will attempt to connect to a host and port until successful. Between each unsuccessful attempt it sleeps for 10 ms+`wait` will attempt to connect to a host and port until it is successful. Between each unsuccessful attempt, it sleeps for 10 ms. Here is an example of the primary function: @@ -32,4 +32,4 @@ while ! nc -z localhost 7000 ; do sleep 0.01 ; done ``` -The above was copied from this stackoverflow answer https://stackoverflow.com/a/50008755+The bash script above was copied from this stackoverflow answer https://stackoverflow.com/a/50008755
port-utils.cabal view
@@ -2,17 +2,18 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3c9f6539125be2f2bac678ef2ea3de3bd1142a989e69ca6921dccbaade661e6f+-- hash: 1d9819c36e0182c73f52e502f0bdd4d406aa01dd948ec440d6852ba1e7bd482b name: port-utils-version: 0.1.0.2+version: 0.1.0.3 synopsis: Utilities for creating and waiting on ports description: Utilities for creating and waiting on ports.- .- @openFreePort@ will create a socket bound to a random port (like @warp@'s @openFreePort@).- .- @wait@ will attempt to connect to given host and port repeatedly until successful.- .+ .+ @openFreePort@ will create a socket bound to a random port (like @warp@'s @openFreePort @).+ .+ @wait@ will attempt to connect to given host and port repeatedly until successful.+ .+ homepage: https://github.com/jfischoff/port-utils#readme bug-reports: https://github.com/jfischoff/port-utils/issues author: Jonathan Fischoff