TTMSMCPClientTransport.Send Method
Sends one JSON-RPC message to the connected server.
API unit family: TMS.MCP.Client.Transport
Declaring type: TTMSMCPClientTransport
Overloads
Overload 1
Sends one JSON-RPC message to the connected server.
procedure Send(const AJsonRpc: string); overload; virtual; abstract;
Remarks
The message is only handed to the channel; any reply arrives separately through OnMessage. A descendant that is not ready to send, because it is not running or has not yet learned where to post to, discards the message silently.
Parameters
| Name | Description |
|---|---|
AJsonRpc |
Message to send, already serialized as JSON. |
Overload 2
Sends one JSON-RPC message, additionally naming the request it carries so that a channel which exposes that information as request metadata does not have to parse the payload.
procedure Send(const AJsonRpc: string; AMethod: string; ANameOrUri: string); overload; virtual; abstract;
Remarks
A descendant whose channel has no place for this metadata simply forwards the message to the single-argument overload and ignores the two extra values.
Parameters
| Name | Description |
|---|---|
AJsonRpc |
Message to send, already serialized as JSON. |
AMethod |
Method name the message invokes. |
ANameOrUri |
Name of the target the method acts on, or its identifier when the target is addressed by one. Empty when the method has no such target. |