Table of Contents

TTMSMCPNamedPipeTransport Class

Message channel that serves clients on the same machine over a named pipe.

API unit family: TMS.MCP.Transport.NamedPipe Inherits from: TTMSMcpTransport

Syntax

TTMSMCPNamedPipeTransport = class(TTMSMcpTransport)

Remarks

Suits a client and a server that run as separate local processes but are not started by one another, which is what separates it from the standard-stream channel. The pipe is a Windows facility, so on other platforms the channel builds but never connects and TTMSMCPNamedPipeTransport.Start leaves it stopped. The underlying pipe server delivers inbound messages through its own callbacks, so nothing has to be pumped by the caller: TTMSMCPNamedPipeTransport.ProcessMessages does nothing and TTMSMCPNamedPipeTransport.Run only parks the calling thread. Each inbound message is handed to TTMSMCPTransport.OnProcessMessage and any answer is broadcast back over the pipe. Clients are not told apart. Outbound messages go to every connected client, and the session-aware members inherited from TTMSMCPTransport keep reporting that there are no sessions, so this channel suits one client at a time.

Properties

Name Description
Connected Reports whether the pipe is up and a client is attached. Read-only.
DefaultTimeout Timeout in milliseconds retained for pipe operations. Defaults to 5000.
PipeName Name the pipe is published under. Defaults to MCPServer.
ServerName Name of the machine hosting the pipe. Empty - the default - means the local machine.

Methods

Name Description
ProcessMessages Does nothing on this channel.
Run Starts the channel if needed and parks the calling thread until it stops.
SendMessage Sends a message to every client currently connected to the pipe.
Start Publishes the pipe and waits briefly for it to come up.
Stop Withdraws the pipe and drops the connected clients.

Used by