/libmicrohttpd-ws

This is an extension for libmicrohttpd to support websocket connection

Primary LanguageCGNU Lesser General Public License v2.1LGPL-2.1

Contributors Forks Stargazers Issues MIT License


Libmicrohttpd WS

An extension of the GNU Libmicrohttpd library for Websocket support

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

This is a modified version of libmicrohttpd (0.9.26) to support the websocket protocol natively. It partially implements the websocket protocol as specified in the technical document rfc6455 to deploy a simple server that supports Synchronous and asynchronous text requests.

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Let's install the dependencies, tested on Ubuntu 18.04:

  • Ubuntu 18.04
    sudo apt-get install cmake autoconf automake libtool libgcrypt11-dev libcurl4-gnutls-dev

Installation

  1. Create the build directory and move in
    mkdir build
    cd build
  2. Initialize the project
    cmake ..
  3. Compile the libmicrohttpd library
    make microhttpd_install

Usage

Important: Tested with Opera, Chrome, and Brave. Currently, it does not work with Firefox.

Example: Echo server

  1. Initialize and compile the library as indicated in the Installation section. Then, in the build directory, run
make run_main

Then go to localhost:9090

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the LGPLv2.1. See LICENSE for more information.

Contact

Giovanni Liboni - giovanni@liboni.me

Project Link: https://github.com/giovanni-liboni/libmicrohttpd-ws

Acknowledgements