Git Product home page Git Product logo

http-server-examples's Introduction

http-server-examples

Examples of how to create an HTTP server based on Qt framework

Presented 2 types of servers; single-threaded (blocking) and multi-threaded (non-blocking). Besides, other classes that are necessary to create a server, such as: Request, Response, and QTcpServer wrapper.

For simplicity - and also because we are only looking for results in these examples; The servers should echo back information about the request that they received - there are no fancy request handlers. Once you get the idea, you will be able to add your own request handler the way that suits your needs.

Single-threaded server

The single-threaded server examples handle only one request at a time. Therefore, it doesn't spawn any thread handlers to handle new incoming requests. It blocks requests until the one currently being handled is done.

Multithreaded server

Unlike the single-threaded server, it handles multiple requests concurrently by using a threadpool, (aka connection pool).

Shared modules

Both implementations of the server class share commom objects, which are: Request, Response, TcpServerWrapper, and ConnectionHandler.

Future plans

  • Single-threaded async server example

http-server-examples's People

Contributors

zaki-x86 avatar

Watchers

 avatar

http-server-examples's Issues

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.