Ping an IP address

How about, I’m working on a P2P module for Julia, and I need to do native ping to a host, there is already a post about this in the forum, but I’m trying to do it internally, from Julia. Is it possible to access the Raw Sockets from Julia? how else can this be done? In case it cannot be done from Julia, is it possible to create an external module in C to do this? In the style of https://github.com/digitalloggers/node-raw-socket/ for NodeJS, could something similar be created for Julia?
Thanks in advance and greetings.

Are you looking for Sockets? Sockets · The Julia Language

Does it need to be an ICMP ping? And are you using Linux? In that case you’ll need root to permanently or temporarily set CAP_NET_RAW for Julia. (The standard ping binary already has this set.)

It does not need to be ICMP, im just trying to get the ms difference. Any idea how o doit without ICMP? Its important to NOT need root access, this is for a end user.
Thanks in advance.

Its a litle bit complex than that

It should be fairly easy to do tcp ping with Sockets.jl. You could follow this python implementation:

1 Like