An open API service indexing awesome lists of open source software.

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.

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/