p2pfl.communication.protocols.memory.memory_neighbors moduleΒΆ
In-memory neighbors.
- class p2pfl.communication.protocols.memory.memory_neighbors.InMemoryNeighbors(self_addr)[source]ΒΆ
Bases:
Neighbors
Implementation of the neighbors side of an in-memory communication protocol.
- connect(addr, non_direct=False, handshake_msg=True)[source]ΒΆ
Connect to a neighbor.
- Parameters:
addr (
str
) β Address of the neighbor to connect.non_direct (
bool
) β If the connection is direct or not.handshake_msg (
bool
) β If a handshake message is needed.
- Return type:
Tuple
[None
,Optional
[str
],float
]