Add mplex tests and fix error in SwarmConn.close

This commit is contained in:
mhchia
2019-09-18 15:44:45 +08:00
parent d61327f5f9
commit a9ad37bc6f
14 changed files with 96 additions and 44 deletions

View File

@ -1,4 +1,11 @@
from asyncio import StreamReader, StreamWriter
from typing import Awaitable, Callable
from typing import Awaitable, Callable, Mapping, Type
from libp2p.security.secure_transport_interface import ISecureTransport
from libp2p.stream_muxer.abc import IMuxedConn
from libp2p.typing import TProtocol
THandler = Callable[[StreamReader, StreamWriter], Awaitable[None]]
TSecurityOptions = Mapping[TProtocol, ISecureTransport]
TMuxerClass = Type[IMuxedConn]
TMuxerOptions = Mapping[TProtocol, TMuxerClass]