https://github.com/jakobod/network-driver
An asynchronous network abstraction framework for applications written C++20.
https://github.com/jakobod/network-driver
async asynchronous-io asyncio communication communication-library cpp internet internet-connection linux multiplexer network network-abstraction socket-api socket-programming tcp tcp-client tcp-server
Last synced: 14 days ago
JSON representation
An asynchronous network abstraction framework for applications written C++20.
- Host: GitHub
- URL: https://github.com/jakobod/network-driver
- Owner: jakobod
- License: gpl-3.0
- Created: 2021-03-25T10:20:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-14T19:22:42.000Z (7 months ago)
- Last Synced: 2025-03-31T12:04:41.738Z (about 2 months ago)
- Topics: async, asynchronous-io, asyncio, communication, communication-library, cpp, internet, internet-connection, linux, multiplexer, network, network-abstraction, socket-api, socket-programming, tcp, tcp-client, tcp-server
- Language: C++
- Homepage:
- Size: 628 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# network-driver
A network abstraction framework aimed at implementing different (multithreaded) multiplexing solutions, encapsulated by a common API.
This is a project I work on in my free time. It may be useful to some, but I just have fun designing this framework :)# Requirements
- C++20
- Linux >= 2.6.2 (Epoll introduced EPOLLONESHOT with this version)
- CMake
- Threads
- OpenSSL (I may relax this with a config option for people that don't want encrypted transport)# How to
building the project is accomplished by doing
```
// On linux this is sufficient
./configure
// On MacOS the OpenSSL root directory must be specified
./configure --openssl-root-dir=$(brew --prefix openssl)make -C build -j$(nproc)
```If one wants to build tests, they have to be enabled explicitly
```
./configure --enable-testing
make -C build -j$(nproc)
make -C build test
```There are many tests bundled with this project, but they may not provide a good base to start. Have a look at my [benchmark](https://github.com/jakobod/network-driver-benchmark) repo where I actually put the whole stack to some use.
# TODO
- [ ] datagram_transport- [x] multithreaded epoll implementation
- [ ] Check for race-conditions?!
- [ ] io_uring implementation
- [ ] EBPF?! - https://www.nginx.com/blog/our-roadmap-quic-http-3-support-nginx/- [ ] Logging utility?
- Should be configurable from the cmake scaffold# Interesting Links
- https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12/
- https://idea.popcount.org/2017-03-20-epoll-is-fundamentally-broken-22/