Ninjaipc
Header-only C/C++ IPC for Windows, Linux and macOS.
Install / Use
/learn @oluan/NinjaipcREADME
NinjaIPC: Effortless Inter-Process Communication
NinjaIPC is your go-to library for straightforward, efficient inter-process communication. It's designed to make IPC as simple as possible, without sacrificing performance. With a small footprint and an easy-to-understand blocking API, NinjaIPC enables you to focus on your application, not the plumbing.
🌟 Highlights
- Simplicity First: Easy to set up and start using immediately.
- Small & Efficient: Minimal codebase with a tiny footprint.
- User-Friendly Blocking API: We handle the complexities so you can get straight to coding.
🌐 Platform Support
| Platform | Support | |-----------|-----------------| | Windows | ✅ Supported | | Linux | ✅ Supported | | macOS | ✅ Supported |
🛠 Language Bindings
| Language | Status | |-----------|-----------------| | C++ | ✅ Officialy supported | | Java | 🚀 Coming Soon | | Node.js | 🚀 Coming Soon |
📚 C++ API Example
The NinjaIPC library also provides a C++ API that makes it even easier to perform inter-process communication.
Below is a simple example demonstrating how to use the Channel class, to communicate a simple int32 back and forth.
/* Server */
#include <ninjaipc.h>
using namespace NinjaIPC;
int main() {
auto channel = Channel::make("Readme", sizeof(int));
while (true) {
auto i = channel->receive<int>();
int r = 321;
channel->reply(r);
std::cout << "Received " << i << " sent " << r << '\n';
}
}
/* Client */
#include <ninjaipc.h>
using namespace NinjaIPC;
int main() {
auto channel = Channel::connect("Readme", sizeof(int));
while (true) {
int i = 123;
int r = channel->send(i);
std::cout << "Sent " << i << " Received " << r << '\n';
}
}
Running server then client, will produce this output:
Received 123 sent 321
Received 123 sent 321
Received 123 sent 321
...
Sent 123 Received 321
Sent 123 Received 321
Sent 123 Received 321
...
📄 License
The source code is licensed under the Apache License 2.0.
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
