simple web server with multi-threading written in C language for 2nd year of my university Networking course module. So far the web server can only handle GET requests from the clients and only works with linux operating system. hope to imporve this to works with windows operating system and POST, PUT, PATCH, DELETE http methods in future :)
├───bin
├───include
├───libs
│ ├───dictionary
│ ├───hashTable
│ ├───queue
│ └───threadpool
├───src
├───tests
└───www
- clone the repository (host OS must be a linux distro. If your pc is not running a linux OS you can use a virtualBox)
- cd web_server
- compile the program using
make
command - run web server using
bin/server -p <port>
command. PORT is the port which you want to run the server (ex-:8080) - open a web browser and go to http://localhost:PORT
make
bin/server -p <port>
https://bruinsslot.jp/post/simple-http-webserver-in-c/
https://www.jmarshall.com/easy/http/
https://www.geeksforgeeks.org/http-headers-content-type/
https://dzone.com/articles/parallel-tcpip-socket-server-with-multi-threading
https://www.geeksforgeeks.org/thread-functions-in-c-c/
https://stackoverflow.com/questions/34510/what-is-a-race-condition