TTMSMCPStreamableHTTPTransport.SendRequestToSession Method
Tries to push a server-initiated request to one session over its open stream.
API unit family: TMS.MCP.Transport.StreamableHTTP
Declaring type: TTMSMCPStreamableHTTPTransport
Syntax
function SendRequestToSession(const ASessionId, ARequestJson: string): Boolean; override;
Remarks
Unlike a notification, a request that cannot be delivered is not held for a later reconnection, so treat False as "delivery not possible" and fall back rather than wait. A True result only means the request was queued, not that the client received or answered it. The client's reply arrives later as an ordinary inbound message and is correlated by the request id.
Parameters
| Name | Description |
|---|---|
ASessionId |
Session to deliver the request to. |
ARequestJson |
Request text to send, normally a JSON-RPC request carrying an id. |
Returns
True when the session has a stream open and the request was queued for it, False when it has none - in which case nothing is sent or recorded at all.