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
EICPException | class | Exception class for IPC-related errors |
TIPCBase | class | Base class for IPC client and server functionality |
TIPCClient | class | IPC client for sending requests and receiving responses |
TIPCServer | class | IPC server for receiving requests and sending responses |
TMessageHeader | record | Message header structure for IPC communication |
TReleaseHandleStream | class | Handle stream that releases file handle on destruction |
Types
TFileHandle | type | File handle type alias |
TMessageType | type | Type for message type identifiers |
Constants
HEADER_VERSION | constant | Message header version identifier |
Resource strings
SErrInvalidServerID | resource string | Error message for invalid server ID |
SErrSetGlobalActive | resource string | Error message for changing Global property while server is active |
SErrSetServerIDActive | resource string | Error message for changing ServerID property while server is active |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
