mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Update the ISecureConn interface following the reference and simplify accordingly
This commit is contained in:
@ -18,14 +18,11 @@ class TransportUpgrader:
|
||||
muxer: Sequence[str]
|
||||
|
||||
def __init__(
|
||||
self, secOpt: Mapping[TProtocol, ISecureTransport], muxerOpt: Sequence[str]
|
||||
) -> None:
|
||||
# Store security option
|
||||
self.security_multistream = SecurityMultistream()
|
||||
for key in secOpt:
|
||||
self.security_multistream.add_transport(key, secOpt[key])
|
||||
|
||||
# Store muxer option
|
||||
self,
|
||||
secure_transports_by_protocol: Mapping[TProtocol, ISecureTransport],
|
||||
muxerOpt: Sequence[str],
|
||||
):
|
||||
self.security_multistream = SecurityMultistream(secure_transports_by_protocol)
|
||||
self.muxer = muxerOpt
|
||||
|
||||
def upgrade_listener(self, transport: ITransport, listeners: IListener) -> None:
|
||||
|
||||
Reference in New Issue
Block a user