Skip to content

Commit

Permalink
Docs updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-belousov committed Jul 5, 2020
1 parent 3a088d0 commit 45102cb
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Or use the latest version from the master (if you are brave enough)::
$ pip install git+https://github.com/stellarbit/aioping

Using aioping
------------
-------------

There are 2 ways to use the library.

Expand Down Expand Up @@ -53,6 +53,23 @@ error:
loop = asyncio.get_event_loop()
loop.run_until_complete(do_ping("google.com"))
Methods
-------

``ping(dest_addr, timeout=10, family=None)``

- ``dest_addr`` - destination address, IPv4, IPv6 or hostname
- ``timeout`` - timeout in seconds (default: ``10``)
- ``family`` - family of resolved address - ``socket.AddressFamily.AF_INET`` for IPv4, ``socket.AddressFamily.AF_INET6``
for IPv6 or ``None`` if it doesn't matter (default: ``None``)

``verbose_ping(dest_addr, timeout=2, count=3, family=None)``

- ``dest_addr`` - destination address, IPv4, IPv6 or hostname
- ``timeout`` - timeout in seconds (default: ``2``)
- ``count`` - count of packets to send (default: ``3``)
- ``family`` - family of resolved address - ``socket.AddressFamily.AF_INET`` for IPv4, ``socket.AddressFamily.AF_INET6``
for IPv6 or ``None`` if it doesn't matter (default: ``None``)

Credits
-------
Expand Down

0 comments on commit 45102cb

Please sign in to comment.