jyn514 / threaded-server

A stupid simple server with threading
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

threaded-server

Build Status

Servers static files and prevents path traversal attacks. Will probably crash if you try anything fancy.

However, it handles requests at about 10 msec/response, which is comparable to Nginx. Try ab -n 1000 -c 100 localhost:8080/ for a comparison.

Usage

$ ./main -h
usage: ./main [<port>] [<host>]

Compiling

Dependencies

Testing

Dependencies

Running Tests

make test

Optional

valgrind --leak-check=full build/main 8080

Run a few queries and see if there's any memory leaks.

But Why?

I'm taking networking and operating systems courses where we don't write any code. I thought it would be nice to get hands-on in system internals.

Licensing

This project is licensed under the BSD 3-Clause license. See LICENSE.txt for details.

TODO