https://github.com/hirbodbehnam/uring_file_server
A dead simple file server built with liburing
https://github.com/hirbodbehnam/uring_file_server
c fileserver io-uring
Last synced: about 1 year ago
JSON representation
A dead simple file server built with liburing
- Host: GitHub
- URL: https://github.com/hirbodbehnam/uring_file_server
- Owner: HirbodBehnam
- License: mit
- Created: 2024-01-31T17:52:46.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-01T07:44:51.000Z (over 2 years ago)
- Last Synced: 2025-02-10T00:47:42.984Z (over 1 year ago)
- Topics: c, fileserver, io-uring
- Language: C
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# uring File Server
A dead simple file server built with liburing.
## Message Format
Server expects each connected client to send its desired file path to download as the first message. After that, server
simply sends all the bytes of the file in the connected socket. If a file could not be opened or was not found, a "NOT
FOUND" will be sent into the socket.
The usage can be simplified like this:
```bash
nc 127.0.0.1 12345 <<<"path/to/file.bin" >file.bin
```
## Building
You can use CMake to build this software. It's important to note that you should have `liburing` installed. I
used `libruing` version 2.5 to compile this software.
```bash
mkdir Build
cd Build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
```