/hast_web

A C++11 websocket server, which is multi-threading, easy to use, and able to receive large data.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

hast_web

Websocket server based on hast core. Let it be a fast server, can handle requests in parallel, and can receive large data like files. The cost is Linux-Only.

Features

  • Extremely easy to use
  • Support most of RFC6455
  • Support WS and WSS
  • Support Partially Receiving for large data. (ex file,image...etc)
  • Inherit from hast: Not just Asynchronous, straight up In Parallel
  • Inherit from hast: Dynamic Thread Pool

Getting Started

  • openssl-devel is installed.
yum install openssl-devel
apt-get install libssl-dev
  • hast is installed.
  • It is header-only library. Copy hast_web folder to your include path.
  • Usage of the library and other details please refer to examples folder in this moment.
  • This project use std::thread , crypto.h and ssl.h, so compilation command can be:
# For ws server
g++ --std=c++11 -pthread -lcrypto .......
# For wss server
g++ --std=c++11 -pthread -lcrypto -lssl .......

How to use

  • Please take a look at examples folder. This library is pretty easy.
  • If you want to know more details about APIs of this library, wiki page is where you want to go.
  • This library is based on hast core. If you want to break down this library to pieces, there is a Abstraction Layer Video.

Framework

  • If you are building a linux server, there is another my project called dalahast. It is a example for this project. It contain a complete system from web front-end to hast back-end.

Bugs and Issues

This project is still in developed and maintained. Open an issue if you discover some problems.