Skip to content

TSimpleIPCClient

Simple IPC client component.

Declaration

Source position: simpleipc.pp line 263

type

  TSimpleIPCClient = class(TSimpleIPC)
  public
    constructor Create;
    destructor Destroy;
    procedure Connect;
    procedure Disconnect;
    function ServerRunning : Boolean;
    procedure SendMessage;
    procedure SendStringMessage(const Msg: string);
    procedure SendStringMessage(MsgType: TMessageType; const Msg: string);
    procedure SendStringMessageFmt(const Msg: string; Args: Array of const);
    procedure SendStringMessageFmt(MsgType: TMessageType; 
                              const Msg: string; Args: Array of const);
  published
    property ServerInstance: string; {rw}
  end;

Description

TSimpleIPCClient is the client side of the simple IPC communication protocol. The client program should create a TSimpleIPCClient instance, set its ServerID property to the unique name for the server it wants to send messages to, and then set the Active property to True.

After the connection with the server was established, messages can be sent to the server with the SendMessage or SendStringMessage calls.

Properties

Member Visibility Description
ServerInstance published Server instance identification.
See all Properties

Methods

Member Visibility Description
Connect public Connect to the server.
Create public Create a new instance of TSimpleIPCClient.
Destroy public Remove the TSimpleIPCClient instance from memory.
Disconnect public Disconnect from the server.
SendMessage public Send a message to the server.
SendStringMessage public Send a string message to the server.
SendStringMessageFmt public Send a formatted string message.
ServerRunning public Check if the server is running.
See all Methods

See also

Name Description
TSimpleIPCServer Simple IPC server component.
TSimpleIPC Ancestor for client/server simple IPC classes.
TIPCClientComm Internal client-side communication protocol.