libmuscle.mpp_client module

class libmuscle.mpp_client.MPPClient(locations: List[str])[source]

Bases: object

A client that connects to an MPP server.

This client connects to a peer to retrieve messages. It uses an MCP Transport to connect.

Create an MPPClient for the given peer.

The client will connect to the peer on one of its locations. It tries the most efficient protocol first. Once connected, it can request messages from any component and port represented by it.

Parameters

locations – The peer’s location strings

close() None[source]

Closes this client.

This closes any connections this client has and/or performs other shutdown activities.

receive(receiver: ymmsl.identity.Reference) bytes[source]

Receive a message from a port this client connects to.

Parameters

receiver – The receiving (local) port.

Returns

The received message.