Sign in Join
FPDoc Onlineexperiment

AdvancedIPC unit

File-based inter-process communication for server-client architectures

The AdvancedIPC unit provides two-way request/response inter-process communication between one server and multiple clients using file-based messaging. The system is non-deterministic - message processing order is not guaranteed. However, SendRequest and PostRequest/PeekResponse sequences from a single client are processed in correct order.

Because it is file based, it should not be used for intensive messaging, but it is suitable for exchanging small messages at startup, for example to transfer control to another instance. It is implemented using files as this is a common denominator on all platforms.

Classes and records

EICPExceptionclassException class for IPC-related errors
TIPCBaseclassBase class for IPC client and server functionality
TIPCClientclassIPC client for sending requests and receiving responses
TIPCServerclassIPC server for receiving requests and sending responses
TMessageHeaderrecordMessage header structure for IPC communication
TReleaseHandleStreamclassHandle stream that releases file handle on destruction

Types

TFileHandletypeFile handle type alias
TMessageTypetypeType for message type identifiers

Constants

HEADER_VERSIONconstantMessage header version identifier

Resource strings

SErrInvalidServerIDresource stringError message for invalid server ID
SErrSetGlobalActiveresource stringError message for changing Global property while server is active
SErrSetServerIDActiveresource stringError message for changing ServerID property while server is active

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.