2022-02-24 07:03:50 +00:00
|
|
|
from typing import TYPE_CHECKING, Protocol
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
import socket
|
2022-02-16 06:49:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Peer(Protocol):
|
2022-02-26 07:06:17 +00:00
|
|
|
transport_address = ""
|
2022-02-16 06:49:32 +00:00
|
|
|
|
2022-02-10 01:29:16 +00:00
|
|
|
def __init__(self):
|
|
|
|
return
|
2022-03-20 17:51:25 +00:00
|
|
|
def get_socket(self, connect_timeout) -> 'socket.socket':
|
2022-02-10 01:29:16 +00:00
|
|
|
return
|
|
|
|
|
2022-02-16 06:49:32 +00:00
|
|
|
def disconnect(self):
|
|
|
|
return
|
2022-02-26 07:06:17 +00:00
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
return
|
|
|
|
|
|
|
|
def __hash__(self):
|
|
|
|
"""Use the transport address"""
|
|
|
|
return
|