diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /mqtt_websockets/c-rbuf/README.md | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mqtt_websockets/c-rbuf/README.md')
-rw-r--r-- | mqtt_websockets/c-rbuf/README.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mqtt_websockets/c-rbuf/README.md b/mqtt_websockets/c-rbuf/README.md new file mode 100644 index 00000000..a6f59408 --- /dev/null +++ b/mqtt_websockets/c-rbuf/README.md @@ -0,0 +1,20 @@ +# c-rbuf [![run-tests](https://github.com/underhood/c-rbuf/workflows/run-tests/badge.svg)](https://github.com/underhood/c-rbuf/actions) + +Simple C ringbuffer implementation with API allowing usage without intermediate buffer. Meant to be as simple as possible to use and integrate. You can copy the files into your project, use it as a static lib, or shared lib depending on what is most convenient for you. + +Usage without intermediate buffer means when reading from file descriptor/socket you can insert data directly into the ringbuffer: +```C +char *ptr; +size_t bytes; +rbuf_t buff = rbuf_create(12345); +ptr = rbuf_get_linear_insert_range(buff, &ret); +read(fd, ptr, bytes); +``` + +**Multiple tail support:** Only single tail is supported but multiple tail support might be implemented in the future. + +**Thread Safety:** Currently you will have to ensure only a single thread accesses the buffer at a time yourself. + +## License + +The Project is released under LGPL v3 license. See [License](LICENSE) |