https://github.com/dustin/waitforsocket
A simple program to help you react more quickly to servers and services coming back online.
https://github.com/dustin/waitforsocket
Last synced: 19 days ago
JSON representation
A simple program to help you react more quickly to servers and services coming back online.
- Host: GitHub
- URL: https://github.com/dustin/waitforsocket
- Owner: dustin
- License: other
- Created: 2008-09-25T00:02:35.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2025-03-08T07:46:23.000Z (4 months ago)
- Last Synced: 2025-04-03T05:24:49.317Z (3 months ago)
- Language: Nix
- Homepage:
- Size: 112 KB
- Stars: 28
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# waitforsocket
`waitforsocket` is a tool that lets you wait for a service or multiple
services to become available. It understands `http`, `https`, and raw
TCP sockets.`waitforsocket` will continue to try all non-connected sockets until
the absolute timeout is reached, or enough connections are made. If
enough connections are established before the absolute timeout, the
process will exit 0, otherwise, the process will exit with a non-zero
status code indicating the required connections were not made.# Usage
```
Usage: waitforsocket [--absTimeout ARG] [--required ARG] [--timeout ARG]
targets...
Wait for network things.Available options:
--absTimeout ARG absolute timeout (default: 0)
--required ARG how many connections required (0 = all) (default: 0)
--timeout ARG connect/retry timeout (ms) (default: 5000)
-h,--help Show this help text
```When waiting for services, there are three configuration parameters to
consider:1. How long are we willing to wait for any results at all?
2. How long are we willing to wait for any given connection to be
established?
3. How many connections are required in order to claim success?