Add some loggings to swarm and cosmetic updates

This commit is contained in:
NIC619
2019-09-14 21:47:49 +08:00
parent 38f4223e62
commit 786a03544c
6 changed files with 47 additions and 48 deletions

View File

@ -34,7 +34,6 @@ class NetStream(INetStream):
def set_protocol(self, protocol_id: TProtocol) -> None:
"""
:param protocol_id: protocol id that stream runs on
:return: true if successful
"""
self.protocol_id = protocol_id
@ -64,7 +63,6 @@ class NetStream(INetStream):
async def close(self) -> None:
"""
close stream
:return: true if successful
"""
await self.muxed_stream.close()

View File

@ -16,10 +16,9 @@ class INetStream(ReadWriteCloser):
"""
@abstractmethod
def set_protocol(self, protocol_id: TProtocol) -> bool:
def set_protocol(self, protocol_id: TProtocol) -> None:
"""
:param protocol_id: protocol id that stream runs on
:return: true if successful
"""
@abstractmethod