p2pfl.communication.protocols.protobuff.memory.client moduleΒΆ
Memory client.
- class p2pfl.communication.protocols.protobuff.memory.client.MemoryClient(self_addr, nei_addr)[source]ΒΆ
Bases:
ProtobuffClient
Implementation of the client side of an in-memory communication protocol.
- Parameters:
self_addr (
str
) β Address of the node.
- is_connected()[source]ΒΆ
Check if a neighbor is connected.
- Return type:
bool
- Returns:
True if the neighbor is connected, False otherwise.
- send(msg, temporal_connection=False, raise_error=False, disconnect_on_error=True)[source]ΒΆ
Send a message to the neighbor.
- Parameters:
msg (
RootMessage
) β Message to send.temporal_connection (
bool
) β If the connection isnβt stablished and a temporal connection is needed for sending the message.raise_error (
bool
) β Raise error if an error occurs.disconnect_on_error (
bool
) β Disconnect if an error occurs.
- Return type:
None