From dbe0df2200e9646878f03e3bb24ecfafd6f8aeb0 Mon Sep 17 00:00:00 2001 From: aratz-lasa Date: Thu, 27 Feb 2020 16:40:34 +0100 Subject: [PATCH] Filled IListener documentation --- libp2p/transport/listener_interface.py | 3 ++- libp2p/transport/tcp/tcp.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libp2p/transport/listener_interface.py b/libp2p/transport/listener_interface.py index 2c6ebea..7815856 100644 --- a/libp2p/transport/listener_interface.py +++ b/libp2p/transport/listener_interface.py @@ -11,7 +11,8 @@ class IListener(ABC): self, maddr: Multiaddr, task_status: Any = trio.TASK_STATUS_IGNORED ) -> bool: """ - put listener in listening mode and wait for incoming connections. + put listener in listening mode and wait for incoming connections. It + blocks until it stops to listen. :param maddr: multiaddr of peer :return: return True if successful diff --git a/libp2p/transport/tcp/tcp.py b/libp2p/transport/tcp/tcp.py index 40fe5bf..8400d6e 100644 --- a/libp2p/transport/tcp/tcp.py +++ b/libp2p/transport/tcp/tcp.py @@ -27,7 +27,8 @@ class TCPListener(IListener): self, maddr: Multiaddr, task_status: TaskStatus[Any] = trio.TASK_STATUS_IGNORED ) -> None: """ - put listener in listening mode and wait for incoming connections. + put listener in listening mode and wait for incoming connections. It + blocks until it stops to listen. :param maddr: maddr of peer :return: return True if successful