mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-10 23:20:55 +00:00
add NegotiableTransport type
This commit is contained in:
committed by
Kevin Mai-Husan Chia
parent
9851ee01fb
commit
dbb702548f
@ -1,7 +1,6 @@
|
||||
from typing import Dict, Tuple
|
||||
|
||||
from libp2p.stream_muxer.abc import IMuxedStream
|
||||
from libp2p.typing import StreamHandlerFn, TProtocol
|
||||
from libp2p.typing import NegotiableTransport, StreamHandlerFn, TProtocol
|
||||
|
||||
from .multiselect_communicator import MultiselectCommunicator
|
||||
from .multiselect_communicator_interface import IMultiselectCommunicator
|
||||
@ -31,7 +30,7 @@ class Multiselect(IMultiselectMuxer):
|
||||
"""
|
||||
self.handlers[protocol] = handler
|
||||
|
||||
async def negotiate(self, stream: IMuxedStream) -> Tuple[TProtocol, StreamHandlerFn]:
|
||||
async def negotiate(self, stream: NegotiableTransport) -> Tuple[TProtocol, StreamHandlerFn]:
|
||||
"""
|
||||
Negotiate performs protocol selection
|
||||
:param stream: stream to negotiate on
|
||||
|
||||
Reference in New Issue
Block a user