Table of Contents

TTMSMCPTransport.OnProcessMessageContext Event

Handler called for every inbound message, with the session it arrived on.

API unit family: TMS.MCP.Transport Declaring type: TTMSMCPTransport

Syntax

OnProcessMessageContext: TTMSMCPTransportProcessMessageContextEvent;

Remarks

Takes precedence over TTMSMCPTransport.OnProcessMessage when both are assigned. Prefer this form whenever the server keeps per-session state.

Parameters

Name Description
SessionId Session the message arrived on, which the handler uses to resolve the per-session state and the negotiated protocol version. Empty for a stateless request, and always empty on a channel that has no notion of sessions.
Body Raw request text received from the client, normally a JSON-RPC message.

Returns

The text the channel writes back to the client, or an empty string when the message needs no answer (a notification).