
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
A Python implementation of TCP ping that tests connectivity to a remote host by attempting TCP connections. It measures connection establishment times and provides detailed statistics.
You can install tcpp
directly from PyPI:
pip install tcpp
Basic usage:
tcpp bing.com
With custom port and count:
tcpp bing.com 443 -c 10
All available options:
tcpp [-h] [-c COUNT] [-t TIMEOUT] [-4] [-6] [-v] host [port]
positional arguments:
host Target hostname or IP address to ping
port Target port number (default: 80)
options:
-h, --help Show this help message and exit
-c, --count COUNT Number of pings to send (default: 10, 0 = infinite)
-t, --timeout SEC Connection timeout in seconds (default: 1.0)
-4 Force using IPv4
-6 Force using IPv6
-v, --version Show program version
You can also use tcpp as a Python library:
import tcpp
# Basic usage
stats = tcpp.ping("bing.com", port=80)
# Access statistics
print(f"Success rate: {stats.success_rate}%")
print(f"Average time: {stats.avg_time:.2f}ms")
TCPING bing.com (13.107.21.200)[:80]
Connected to bing.com[:80]: seq=1 time=61.64 ms
Connected to bing.com[:80]: seq=2 time=61.39 ms
Connected to bing.com[:80]: seq=3 time=59.84 ms
Connected to bing.com[:80]: seq=4 time=59.29 ms
--- bing.com[:80] tcping statistics ---
4 connections, 4 successed, 0 failed, 100.00% success rate
min = 59.29ms, max = 61.64ms, avg = 60.54ms, med = 60.62ms, mdev = 1.00ms
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Python implementation of TCP ping that tests connectivity to a remote host
We found that tcpp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.