Code Monkey home page Code Monkey logo

http's Introduction

HTTP

自行开发的HTTP服务器,多个版本,由简单到复杂

##版本1 Tiny HTTP,来自CSAPP上

##版本2 ###my_HTTP 基于HA/HS模型的Epoll多线程服务器框架
大量使用C++11的新特性,封装了一个基于Epoll的线程池模型的HTTP服务器

####特性:

  1. 实现工作队列,工作队列中保存链接的文件描述符connfd,和根据使用的协议注册的回调函数
  2. Epoll类作为Reactor,只监听新连接上的客户,并为客户注册回调函数
  3. TCPServer模板类接受协议参数,并启动多线程处理函数,以及Epoll事件监听。

####支持的协议:

  1. 最基础的回射协议,封装在./Protocol/Echo.h 类中

####文件分布:

  1. /Base为包裹函数,修改自caspp中的源代码至c++版本
  2. ./Protocol中为支持的协议,现在完成了回射协议
  3. ./EventLoop中封装了Epoll类,工作队列
  4. ./TCPServer中,封装了模板服务器类,使用Epoll类和协议类支持服务
  5. ./src中,为编写的主函数文件,现在只有回射服务器启动函数
  6. ./build,为生成的可执行文件

http's People

Contributors

yinwenatbit avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.