Table of Contents

TTMSMCPClientTransport Class

Base class for the client side of a protocol connection: it carries JSON-RPC messages to a server and reports the messages that come back.

API unit family: TMS.MCP.Client.Transport

Syntax

TTMSMCPClientTransport = class

Remarks

The class is abstract; a concrete descendant implements one channel, such as a server launched as a child process and driven over its standard streams, or a server reached over a network endpoint. Applications normally do not create a transport directly, because the client component selects and configures one from the transport type recorded on the server entry; create one explicitly only when driving the protocol by hand.

Properties

Name Description
IsLegacy Indicates that the connected server speaks an older revision of the protocol: True makes the transport use the exchange pattern that older revision expects, False keeps the current one.
ProtocolVersion Protocol revision the connection has settled on, announced to the server on the requests that follow.

Methods

Name Description
IsRunning Reports whether the transport is currently able to exchange messages.
Send Sends one JSON-RPC message to the connected server.
Start Brings the transport into the running state so that messages can be exchanged.
Stop Takes the transport out of the running state and releases the channel it holds.

Events

Name Description
OnMessage Occurs for every protocol message the transport receives from the server.

Used by