Coder Social home page Coder Social logo

gerhobbelt / cpp-ipc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mutouyun/cpp-ipc

0.0 0.0 0.0 2.18 MB

C++ IPC Library: A high-performance inter-process communication using shared memory on Linux/Windows.

License: Other

C++ 85.50% C 12.67% CMake 1.83%

cpp-ipc's Introduction

cpp-ipc (libipc) - C++ IPC Library

MIT licensed Build Status Build status Vcpkg package

A high-performance inter-process communication library using shared memory on Linux/Windows.

  • Compilers with C++17 support are recommended (msvc-2017/gcc-7/clang-4)
  • No other dependencies except STL.
  • Only lock-free or lightweight spin-lock is used.
  • Circular array is used as the underline data structure.
  • ipc::route supports single read and multiple write. ipc::channel supports multiple read and write. (Note: currently, a channel supports up to 32 receivers, but there is no such a limit for the sender.)
  • Broadcasting is used by default, but user can choose any read/ write combinations.
  • No long time blind wait. (Semaphore will be used after a certain number of retries.)
  • Vcpkg way of installation is supported. E.g. vcpkg install cpp-ipc

Usage

See: Wiki

Performance

Environment Value
Device Lenovo ThinkPad T450
CPU Intel® Core™ i5-4300U @ 2.5 GHz
RAM 16 GB
OS Windows 7 Ultimate x64
Compiler MSVC 2017 15.9.4

Unit & benchmark tests: test
Performance data: performance.xlsx

Reference


使用共享内存的跨平台(Linux/Windows,x86/x64/ARM)高性能IPC通讯库

  • 推荐支持C++17的编译器(msvc-2017/gcc-7/clang-4)
  • 除STL外,无其他依赖
  • 无锁(lock-free)或轻量级spin-lock
  • 底层数据结构为循环数组(circular array)
  • ipc::route支持单写多读,ipc::channel支持多写多读【注意:目前同一条通道最多支持32个receiver,sender无限制
  • 默认采用广播模式收发数据,支持用户任意选择读写方案
  • 不会长时间忙等(重试一定次数后会使用信号量进行等待),支持超时
  • 支持Vcpkg方式安装,如vcpkg install cpp-ipc

使用方法

详见:Wiki

性能

环境
设备 联想 ThinkPad T450
CPU 英特尔® Core™ i5-4300U @ 2.5 GHz
内存 16 GB
操作系统 Windows 7 Ultimate x64
编译器 MSVC 2017 15.9.4

单元测试和Benchmark测试: test
性能数据: performance.xlsx

参考

cpp-ipc's People

Contributors

mutouyun avatar randomizedthinking avatar superwangkai avatar winsoft666 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.