This is a simple library that exposes POSIX Message Queue functions for soldatserver. Check overview of POSIX Message Queues here.
The usage in soldat scriptoce is similar to the POSIX Message Queue. For details see the include/libposixmq.pas
.
Since POSIX IPC is not implemented on Windows, the library will only work on Unix-like operating systems like Linux.
- gcc
- g++
- cmake
- make
- build-essential
- gcc-multilib
- g++-multilib
mkdir build
cd build
cmake ..
make
- Copy compiled
libposixmq.so
into soldatserver root directory - Change the value of
AllowDlls
under[ScriptCore3]
section inserver.ini
in your soldatserver toAllowDlls=1
to allow external DLLs loading in your soldatserver (refer to wiki.soldat.pl) - Copy the
include/libposixmq.pas
into a new directoryscripts/libposixmq/
in soldatserver - In future scripts make sure to add this configuration to the scripts'
config.ini
:[Config] ... AllowDlls=1 [SearchPaths] ../libposixmq
To run python script, following system packages are needed:
- python3.8 (or later)
- python3.8-venv (or later)
- python3-dev
- pip3
After doing Preparation, copy example/scripts/
to soldatserver's scripts/
.
Open Terminal 1 and go to soldatserver root directory. Run soldatserver:
./soldatserver
Open Terminal 2 and go to example/
. Prepare python environment:
python3 -m venv example-venv
source example-venv/bin/activate
python3 -m pip install posix_ipc
Run the example.py
:
python3 example.py