TTMSMCPNamedPipeTransport.SendMessage Method
Sends a message to every client currently connected to the pipe.
API unit family: TMS.MCP.Transport.NamedPipe
Declaring type: TTMSMCPNamedPipeTransport
Syntax
function SendMessage(const Message: string): Boolean;
Remarks
A True result only means the message was handed to the pipe, not that a client read it. Answers produced by TTMSMCPTransport.OnProcessMessage are sent this way automatically, so calling it directly is only needed to push something the client did not ask for. Failures are reported through TTMSMCPTransport.OnError and turn into a False result rather than an exception.
Parameters
| Name | Description |
|---|---|
Message |
Text to send. Encoded as UTF-8 before it goes on the wire. |
Returns
True when the pipe server accepted the message for delivery. False when no client is connected, when the send failed, or on a platform without named pipes.