GithubHelp home page GithubHelp logo

wanghes / cpp11webserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhangwenxiao/cpp11webserver

0.0 1.0 0.0 8.38 MB

A High Performance HTTP Web Server in C++11

C++ 69.18% Makefile 5.24% HTML 0.86% Shell 0.16% C 20.58% Roff 3.98%

cpp11webserver's Introduction

SWINGS WebServer


简介

SWINGS是用C++11实现的高性能Web服务器,可处理静态资源请求,支持HTTP长连接及超时断开

代码统计

开发工具

  • 操作系统: Ubuntu18.04LTS
  • 编译器: vim + vscode + sublime
  • 编译器: g++ 7.3.0
  • 版本控制: git
  • 工程构建: make
  • 调试工具: gdb
  • 压测工具: webbench

使用方式

git clone [email protected]:zhangwenxiao/swings.git
cd code
make
sh run.sh

技术要点

  • 并发模型为Reactor
  • 使用Epoll水平触发+EPOLLONESHOT,非阻塞IO
  • 为充分利用多核CPU的性能,以多线程的形式实现服务器,并实现线程池避免线程频繁创建销毁造成的系统开销
  • 实现基于小根堆的定时器,用于断开超时连接
  • 实现可以自动增长的缓冲区,作为HTTP连接的输入和输出缓冲区

文档

Part I Part II Part III Part IV Part V Part VI Part VIII Part IX
项目目的 并发模型 核心类 整体架构 主要函数 遇到的问题 并发测试 相关知识

cpp11webserver's People

Contributors

zhangwenxiao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.