[Overview][Resource strings][Constants][Types][Classes][Variables][Index] Reference for unit 'simpleipc' (#fcl)

TSimpleIPCServer

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Simple IPC server component

Declaration

Source position: simpleipc.pp line 87

type TSimpleIPCServer = class(TSimpleIPC)

protected

  FIPCComm: TIPCServerComm;

  function CommClass; virtual;

  procedure Activate; override;

  procedure Deactivate; override;

  procedure ReadMessage;

public

  constructor Create(); override;

  

Create a new instance of TSimpleIPCServer

  destructor Destroy; override;

  

Remove the TSimpleIPCServer instance from memory

  procedure StartServer;

  

Start the server

  procedure StopServer;

  

Stop the server

  function PeekMessage();

  

Check if a client message is available.

  StringMessage: ;

  

Last message as a string.

  procedure GetMessageData();

  

Read the data of the last message in a stream

  MsgType: TMessageType;

  

Last message type

  MsgData: TStream;

  

Last message data

  InstanceID: ;

  

Instance ID

published

  Global: Boolean;

  

Is the server reachable to all users or not

  OnMessage: TNotifyEvent;

  

Event triggered when a pessage arrives

end;

Inheritance

TSimpleIPCServer

  

Simple IPC server component

|

TSimpleIPC

  

Ancestor for client/server simple IPC classes

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TSimpleIPCServer is the server side of the simple IPC communication protocol. The server program should create a TSimpleIPCServer instance, set its ServerID property to a unique name for the system, and then set the Active property to True (or call StartServer).

After the server was started, it can check for availability of messages with the PeekMessage call, and read the message with ReadMessage.

See also

TSimpleIPCClient

  

Simple IPC client component

TSimpleIPC

  

Ancestor for client/server simple IPC classes

TIPCServerComm

  

Internal message communication component

This page is hosted on Get Lazarus Code and Component Repository at SourceForge.net. Fast, secure and Free Open Source software downloads