nvflare.private.fed.server.message_send module¶
- class ClientReply(client_token: str, client_name: str, req: Message, reply: Message)[source]¶
Bases:
object
Client reply.
- Parameters:
client_token (str) – client token
client_name (str) – name of the client
req (Message) – request
reply (Message) – reply
- send_requests(cell, command: str, requests: dict, clients, job_id=None, timeout_secs=2.0, optional=False) [<class 'nvflare.private.fed.server.message_send.ClientReply'>] [source]¶
Send requests to clients.
NOTE:
This method is to be used by a Command Handler to send requests to Clients. Hence, it is run in the Command Handler's handling thread. This is a blocking call - returned only after all responses are received or timeout.
- Parameters:
cell – the source cell
command – the command to be sent
clients – the clients the command will be sent to
requests – A dict of requests: {client token: request or list of requests}
job_id – id of the job that the command is applied to
timeout_secs – how long to wait for reply before timeout
optional – whether the message is optional
- Returns:
A list of ClientReply