ping.cr
Version, currently master branch1 version
- master branchlatestNov 21, 2018
github.com/arcage/ping.cr
Minimum ping command clone by Crystal langage.
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
ping.cr:
github: arcage/ping.cr
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.27.0- License
- MIT
- Author
- ʕ·ᴥ·ʔAKJ
Dependencies
This version declares no dependencies.
README
Ping.cr
The minimum ICMP echo handling shard.
This shard is only an experiment to use the raw socket in the Crystal language.
Installation
- Add the dependency to your
shard.yml:
dependencies:
ping:
github: arcage/ping.cr
- Run
shards install
Usage
# src/ping_command.cr
require "ping"
Ping.command(ARGV.shift)
$ sudo crystal src/ping_command.cr 192.0.2.1
PING 192.0.2.1: 56 data bytes
64 bytes from 192.0.2.1: icmp_seq=0 ttl=253 time=1.903 ms
64 bytes from 192.0.2.1: icmp_seq=1 ttl=253 time=1.466 ms
64 bytes from 192.0.2.1: icmp_seq=2 ttl=253 time=1.355 ms
64 bytes from 192.0.2.1: icmp_seq=3 ttl=253 time=2.115 ms
64 bytes from 192.0.2.1: icmp_seq=4 ttl=253 time=2.074 ms
--- 192.0.2.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.355/1.783/2.115/0.346 ms
NOTE: Because this shard use RAW SOCKET, you need sudo when execute the program with this shard.
Contributors
- ʕ·ᴥ·ʔAKJ - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Nov 21, 2018
- Crystal
0.27.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/arcage/ping.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1