Table of Contents

TTMSMCPStdioTransport.ProcessMessages Method

Reads one line from standard input, has it handled, and writes the answer to standard output.

API unit family: TMS.MCP.Transport.STDIO Declaring type: TTMSMCPStdioTransport

Syntax

procedure ProcessMessages; override;

Remarks

Returns immediately when the channel is not running. The read blocks until a full line is available, so this call waits for the client rather than polling. A blank line is skipped, and an empty answer - the normal result for a notification - is not written. Output is flushed after every answer so the client is not left waiting on a buffer. Any exception raised while reading or handling is reported through TTMSMCPTransport.OnError and swallowed, so one bad message does not end the loop.

Exceptions

Exception Description
Exception Raised when no message handler has been assigned.