Skip to content

A very simple, fast, multithreaded web and websocket server. Easy to use to create C ++ REST and WEB applications.

License

Notifications You must be signed in to change notification settings

sovamaster/web-server

Repository files navigation

Simple Web-Server and WebSocket-Server

A very simple, fast, multithreaded web and websocket server. Easy to use to create C ++ REST and WEB applications.

Features

  • Multithreaded request handling
  • Platform independent
  • HTTPS clients support
  • HTTP persistent connection (for HTTP/1.1)
  • Client supports chunked transfer encoding
  • Synchronous handling of multiple websocket clients
  • Basic client authorisation

Usage

See test.hpp and api.hpp for example usage.

Dependencies

Compile and run

Compile with a C++11 compliant compiler:

cd <your project directory> //At the same level as the Makefile.
make server
./web-server

Checks and testing

For web-server testing open with your favorite browser swagger page http://localhost:37378/swagger/ui For websocket-server testing open with your favorite browser test page http://localhost:37378/ws_test.html

If your test domain is different from localhost, change it in line 35 in the ws_test.html file. If you want to change port number, do it in the web-server.ini file. For changing websocket port also change one in line 35 in the ws_test.html file.

For basic authorisation set SERVER-AUTHT to 1 in web-server.ini file. See authorisation and permit data in users.json file.

To test the web client, the https://httpbin.org/ REST service is used.

About

A very simple, fast, multithreaded web and websocket server. Easy to use to create C ++ REST and WEB applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages