mirror of
https://github.com/blmvxer/netTest
synced 2026-01-14 02:51:46 +00:00
No description
| examples | ||
| src | ||
| .gitignore | ||
| LICENSE | ||
| netTest.nimble | ||
| README.md | ||
netTest
Basic Internet Test for Nim Web Projects
How to use
copy netTest.nim to the projects src folder
import netTest into which ever file will test the connection
after importing you can use testConn("service", timeout)
service being either google or cloudflare and timeout in miliseconds
Basic usage
import netTest
echo("Testing google")
testConn(google, port, 2000)
Output: @[true, true] or @[false, false]
testConn proc's
testConn([cloudflare, google], port, timeout)
output: @[bool, bool]
testConn("server", port, timeout)
output: bool
testConn(@["server0", "server1", "server2"], port, timeout)
output: @[bool, bool, bool]