Skip to content

Tamil-0714/C-HTTP-Audio-Server

Repository files navigation

Keep the audio file inside a folder "sounds"
char *audio_path = "sounds/";
then compile and run the 'updateDatabase.c' file gcc -o updateDB updateDatabase.c and ./updateDB , this will create a SQLite DB file called file_data.db that contains the audio files meta data

After that run the main server

gcc clrfnc.c dbfnc.c fileio.c stdfnc.c main.c -o MainServer -lsqlite3
./MainServer

if (strcmp(req->route, "/files") == 0) this route /files respond back a JSON contains the audio file id and file name ,

[{"FA37jNCchRYdSBZA":"file name"}]

use this route /audio/:id , the id is from the JSON and this route will respond back with base64 encoded string of audio file corresponded to the audio id

apache benchmark result for 1000 cuncurrent request

image

Valgrind summary about memory leaks

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages