Skip to content

elln2/C-Server-Collection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic badge

C-Server-Collection

A collection of Servers written in C

Single threaded non concurrent: single-HTTP Multithreaded concurrent: threaded-HTTP Selecting concurrent: select-HTTP Forking concurrent: fork-HTTP

Project Note

Runs in a unix like environment.

These servers are build as a proof of concept and a challenge to myself. They can be used as a testing or production server with the appropriate modifications for your needs. An individual with intermediate knowledge of C and SQL is recommended.

Development Requirements

  • gcc
  • libsqlite3-dev

Building

If you are adding features or debugging a server run: make [debug]

If optimizing run: make profile

  • An alternative would be to compile the source code using: make [debug] and use the OProfile program.

If using for production run: make production

Options

  • Dump the entire database or a specified table (-d)[table_name]
  • Load a database fixture (-l)
  • Print help menu (-h)
  • Print version number (-V)
  • Print verbose output (-v)
  • Set a configuration file to be used (-s)
  • Run the server as a specific effective user id (-u)
  • Run the server as a specific effective group id (-g)

Logging

All servers follow a rolling log file implementation where logs follow the structure of .../logs/year/month/week/day.log.

Limitations

  1. Given the servers are written in C, adding a path to the URL routing list structure requires the server to be recompiled and restarted.

  2. Given the C languange is a non object oriented language the use of a true database ORM is not possible. An intermediate knowledge if the SQL language is recommended when using the database API.

  3. These servers are custom build from the ground up and, as such, are not HTTP 1.1 or HTTP 1.0 compliant. With this said, the servers follow closely the HTTP 1.0 specification.

  4. None of the servers are load balancing capable or implement connection timeouts.

Contribution

Anyone can contribute and work on any available issues.

Keep the same format as is used. After, simply make a pull request and have patience.

About

A collection of Servers written in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.2%
  • HTML 6.3%
  • Python 5.0%
  • Makefile 1.7%
  • Shell 1.5%
  • CSS 0.7%
  • Other 0.6%