Toolshed.Net.ping
You're seeing just the function
ping
, go back to Toolshed.Net module for more information.
Specs
Ping an IP address using TCP
This tries to connect to the remote host using TCP instead of sending an ICMP echo request like normal ping. This made it possible to write in pure Elixir.
NOTE: Specifying an :ifname
only sets the source IP address for the TCP
connection. This is only a hint to use the specified interface and not a
guarantee. For example, if you have two interfaces on the same LAN, the OS
routing tables may send traffic out one interface in preference to the one
that you want. On Linux, you can enable policy-based routing and add source
routes to guarantee that packets go out the desired interface.
Options:
:ifname
- Specify a network interface to use. (e.g., "eth0")
Examples
iex> ping "nerves-project.org"
Press enter to stop
Response from nerves-project.org (185.199.108.153): time=4.155ms
Response from nerves-project.org (185.199.108.153): time=10.385ms
Response from nerves-project.org (185.199.108.153): time=12.458ms
iex> ping "google.com", ifname: "wlp5s0"
Press enter to stop
Response from google.com (172.217.7.206): time=88.602ms