libmuscle.mcp.tcp_server module¶
- class libmuscle.mcp.tcp_server.TcpHandler(request, client_address, server)[source]¶
Bases:
BaseRequestHandler
Handler for MCP-over-TCP connections.
- class libmuscle.mcp.tcp_server.TcpServer(instance_id: Reference, post_office: PostOffice)[source]¶
Bases:
Server
A server that accepts MCP connections over TCP.
Create a TCPServer.
- Parameters
instance_id – Id of the instance we’re a server for.
post_office – A PostOffice to obtain data from.
- close() None [source]¶
Closes this server.
Stops the server listening, waits for existing clients to disconnect, then frees any other resources.
- get_location() str [source]¶
Returns the location this server listens on.
- Returns
A string containing the location.
- property post_office: PostOffice¶
Export this so the server thread can use it.