libmuscle.mcp.tcp_client module¶
- class libmuscle.mcp.tcp_client.TcpClient(instance_id: Reference, location: str)[source]¶
Bases:
Client
A client that connects to an MCP-over-TCP server.
Create a TcpClient for a given location.
The client will connect to this location and be able to request messages from any instance and port represented by it.
- Parameters
instance_id – Id of our instance.
location – A location string for the peer.
- static can_connect_to(location: str) bool [source]¶
Whether this client class can connect to the given location.
- Parameters
location – The location to potentially connect to.
- Returns
True iff this class can connect to this location.