mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
add NegotiableTransport type
This commit is contained in:
committed by
Kevin Mai-Husan Chia
parent
9851ee01fb
commit
dbb702548f
@ -1,8 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
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
|
||||
|
||||
|
||||
class IMultiselectMuxer(ABC):
|
||||
@ -23,7 +22,7 @@ class IMultiselectMuxer(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
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