libt2n - C++ library for IPC
libt2n (talk to neighbor) is a C++ library for inter-process communication (IPC) with an additional code generator (libt2n-codegen)
2015-05-13: Version 0.7 of libt2n released
- add support for external select() calls
- reset timeout if connection is active
- cmake build system and general cmake support
- prevent buffer overflow with overlong socket paths
- fix compilation with newer gcc / glibc versions
- Switch license to GPLv2 + linking exception
- Don't rethrow unknown exceptions
- Migrate to Boost unit test framework
- gccxml wrapper: Filter -pthread from newer gcc versions
- rpm package: Build in parallel
- New project home
- Fixed calls to virtual functions in constructors/destructors
- Improvements for data transfers larger than 2 GB
- Fixed uninitialized variables causing random transfer problems
Before inventing our own IPC library, we checked a lot of other IPC frameworks like CORBA, D-BUS and ICE. But they weren't easy
to use (you need many lines of code to export or use a method, let alone good error handling) and did not allow passing complex
C++ objects like vectors, maps and your own classes. To get all this we had to develop our own framework.
Here's a list of goals we had in mind while developing:
- easy to use, mimimum of code-lines needed to export and use methods
- handles complex C++ structures like maps of vectors, etc.
- passes exceptions from the server back to the caller
- easy integration into autotools and pkg-config
Of course we had to limit the feature set, so libt2n currently has these restrictions:
- C++ only
- Synchronous, blocking, no callbacks
- no server-side objects, just functions you can call
- no threads or multiple server processes for handling multiple requests at once
Communication between client and server is currently done using Unix domain sockets (named pipes) or TCP. But the library is designed transport-independent, so it can be expanded to shared memory or other mechanisms.
Serializing all the complex objects is done with Boost serialization.
The library itself is licensed under LGPL 2.1 (not any later).