From 11db313b17235fef8f39bf85b61b2b13e74619fa Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 28 Oct 2019 18:43:59 +0900 Subject: [PATCH] A mux can provide the protocols it responds to --- libp2p/protocol_muxer/multiselect_muxer_interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libp2p/protocol_muxer/multiselect_muxer_interface.py b/libp2p/protocol_muxer/multiselect_muxer_interface.py index 66e0392a..935545f6 100644 --- a/libp2p/protocol_muxer/multiselect_muxer_interface.py +++ b/libp2p/protocol_muxer/multiselect_muxer_interface.py @@ -22,6 +22,9 @@ class IMultiselectMuxer(ABC): :param handler: handler function """ + def get_protocols(self) -> Tuple[TProtocol, ...]: + return tuple(self.handlers.keys()) + @abstractmethod async def negotiate( self, communicator: IMultiselectCommunicator