py-libp2p/libp2p/security/secure_conn_interface.py
2019-07-31 15:00:12 -07:00

25 lines
598 B
Python

from abc import ABC, abstractmethod
# pylint: disable=W0105
"""
Represents a secured connection object, which includes a connection and details about the security
involved in the secured connection
Relevant go repo: https://github.com/libp2p/go-conn-security/blob/master/interface.go
"""
class ISecureConn(ABC):
@abstractmethod
def get_conn(self):
"""
:return: connection object that has been made secure
"""
@abstractmethod
def get_security_details(self):
"""
:return: map containing details about the connections security
"""