mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-10 23:20:55 +00:00
added ping docs
This commit is contained in:
committed by
Paul Robinson
parent
4620142ed1
commit
bcc7d256a6
18
docs/examples.ping.rst
Normal file
18
docs/examples.ping.rst
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Ping Demo
|
||||||
|
=========
|
||||||
|
|
||||||
|
Copy the code below into a file called ``ping.py``.
|
||||||
|
Install dependencies, preferably in a virtual environment, with:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
python -m pip install libp2p
|
||||||
|
|
||||||
|
Run the demo with ``python ping.py`` and copy the output.
|
||||||
|
|
||||||
|
Open a second terminal, navigate to the folder that contains ``ping.py``, then paste
|
||||||
|
and run the copied line.
|
||||||
|
|
||||||
|
.. literalinclude:: ../examples/echo/echo.py
|
||||||
|
:language: python
|
||||||
|
:linenos:
|
||||||
@ -12,6 +12,7 @@ Example Scripts
|
|||||||
|
|
||||||
examples.chat
|
examples.chat
|
||||||
examples.echo
|
examples.echo
|
||||||
|
examples.ping
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
|
|||||||
Reference in New Issue
Block a user