For Mac App Swift application what is the command to ping a web page like google?

Update: For example, in a windows command prompt I would do ping www.google.com

How would I do thiswith a swift command?
2 answers 2