huangshengh / hserver

A httpserver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hserver

hserver is a simple httpserver with threadpool and epoll.

This version has many bugs

hserver8 is a stronger version.

Model

main thread hold listenfd in epoll,each work thread also has epoll. Main thread use pipe to communicate with work thread,so we can tranfer the connfd.

Epoll

use epollet, epolloneshot.

http parse

Parse the header to achieve keep-alive functions.

log

Use UNIX socket to communicate log server thread and log client thread. This works bad,use linkedlist with lock may be better.

About

A httpserver


Languages

Language:C 83.9%Language:HTML 14.5%Language:C++ 1.4%Language:Makefile 0.2%