https://github.com/ya2ir/multithreaded-server-in-c
Simple Multithreaded Server in C
https://github.com/ya2ir/multithreaded-server-in-c
c multithreading pthreads pthreads-api server socket-programming sockets
Last synced: 10 months ago
JSON representation
Simple Multithreaded Server in C
- Host: GitHub
- URL: https://github.com/ya2ir/multithreaded-server-in-c
- Owner: YA2IR
- Created: 2024-06-29T19:08:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-10T18:25:59.000Z (over 1 year ago)
- Last Synced: 2025-02-07T22:26:47.460Z (about 1 year ago)
- Topics: c, multithreading, pthreads, pthreads-api, server, socket-programming, sockets
- Language: C
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# multithreaded-server-in-c
This is a simple multithreaded web server written in C. It serves static HTML pages from the "files" directory.
### Features:
- Multithreaded, thread-safe. No leaks (as per Valgrind at least).
- Has static routing and redirect functionalities.
- Has a thread pool (reuses threads) instead of forking or creating threads on the fly.
- Uses condition variables instead of busy waiting.
### Limitations:
- It does not fully implement HTTP 1.1, but it can communicate with browsers.
- It should not be used in production, as I haven't checked it for security beyond the basic requirements
### Getting it Running:
Compile and run the server:
```
gcc queue.c hash_table.c server.c -o server
./server
```
Then write in your browser:
```
localhost:4444
```