Month: July 2011

C

Simple Multi-threaded web server written in C using pthreads

This Multi-threaded web server takes advantage of the posix thread library to enable it it serve multiple files at the same time. ┬áCompile using gcc and run on a linux server. // Multi-Threaded web server using posix pthreads // BK Turley 2011 //this simple web server is capible of serving simple html, jpg, gif & text files //—– Include files ——————————————————— #include <stdio.h> // for printf() #include <stdlib.h> // for exit() #include <string.h> // for strcpy(),strerror() and strlen() #include <fcntl.h> // for file i/o constants #include <sys/stat.h> // for file i/o constants #include <errno.h> /* FOR BSD UNIX/LINUX —————————————————- */ […]