This commit is contained in:
Chih Cheng Liang
2019-08-08 14:22:06 +08:00
committed by Kevin Mai-Husan Chia
parent 5903012e0e
commit c536aa3e07
19 changed files with 58 additions and 62 deletions

View File

@ -1,9 +1,7 @@
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from libp2p.network.connection.raw_connection_interface import IRawConnection
from .typing import TSecurityDetails
from libp2p.network.connection.raw_connection_interface import IRawConnection
from .typing import TSecurityDetails
"""
@ -16,13 +14,13 @@ Relevant go repo: https://github.com/libp2p/go-conn-security/blob/master/interfa
class ISecureConn(ABC):
@abstractmethod
def get_conn(self) -> "IRawConnection":
def get_conn(self) -> IRawConnection:
"""
:return: the underlying raw connection
"""
@abstractmethod
def get_security_details(self) -> "TSecurityDetails":
def get_security_details(self) -> TSecurityDetails:
"""
:return: map containing details about the connections security
"""