https://github.com/yuce/waitport
https://github.com/yuce/waitport
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuce/waitport
- Owner: yuce
- License: mit
- Created: 2022-07-16T12:10:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-16T20:14:20.000Z (almost 3 years ago)
- Last Synced: 2025-01-03T13:46:44.294Z (over 1 year ago)
- Language: C
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# waitport
`waitport` is a simple utility that waits for a TCP port to be connectable.
It is very small, about 10KBs when compiled and stripped.
## Build
Requirements:
* Linux / OpenBSD / macOS (May work on other POSIX).
* C compiler with C99 support.
### Using Make
Just:
```
$ make
```
### Using CMake
```
$ mkdir build && cd $_
$ cmake ..
$ make
```
## Usage
Wait indefinitely on port 9701 at localhost, try every second:
```
$ waitport 9701
```
Wait indefinitely on port 9701 at foobar.com, try every second:
```
$ waitport foobar.com 9701
```
Wait 10 seconds on port 9701, try every second:
```
$ waitport 9701 -t 10
```
Wait 10 seconds on port 9701, try every 100 ms:
```
$ waitport 9701 -t 10 -s 0.1
```
### License
[MIT](LICENSE)