p2pfl.communication.protocols.grpc.grpc_neighbors moduleΒΆ
gRPC neighbors.
- class p2pfl.communication.protocols.grpc.grpc_neighbors.GrpcNeighbors(self_addr)[source]ΒΆ
Bases:
Neighbors
Implementation of the neighbors for a GRPC 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
[Optional
[Channel
],Optional
[NodeServicesStub
],float
]