Skip to content
Simple, secure & standards compliant web server for the most demanding of applications
C++ C Makefile QMake
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Create FUNDING.yml May 11, 2020
benchmarks Update README.md May 14, 2020
examples Add shared compression for pub/sub May 28, 2020
fuzzing Update TopicTree fuzzing Jun 1, 2020
misc New frontpage May 12, 2020
src Add shared compression for pub/sub May 28, 2020
tests Clean-up TopicTree test May 8, 2020
uSockets @ 2ed0584 Update to uSockets v0.4.0 May 24, 2020
.gitmodules Set up projects May 6, 2018
LICENSE Apache License 2.0 Oct 28, 2018
Makefile Build examples in parallel Jun 2, 2020
README.md Update README.md May 17, 2020

README.md


Simple, secure[1] & standards compliant[2] web server for the most demanding[3] of applications. Read more...

Language grade: C/C++



🔐 Optimized security

Being meticulously optimized for speed and memory footprint, µWebSockets is fast enough to do encrypted TLS 1.3 messaging quicker than most alternative servers can do even unencrypted, cleartext messaging[3].

Furthermore, we partake in Google's OSS-Fuzz with a ~90% daily fuzzing coverage with no sanitizer issues. LGTM scores us flawless A+ from having zero CodeQL alerts.

▶️ Rapid scripting

µWebSockets is written entirely in C & C++ but has seamless integrations for both Python3 and Node.js backends. This allows for rapid scripting of powerful apps, in your favorite environment.

  

🔋 Batteries included

Designed around a convenient URL router with wildcard & parameter support - paired with efficient pub/sub features inspired by MQTT. µWebSockets should be the obvious, complete starting point for any real-time web project with high demands.

Start building your Http & WebSocket apps in a swift; read the user manual and see examples. You can browse our TypeDoc for a quick overview.

uWS::SSLApp({

    /* There are tons of SSL options, see uSockets */
    .cert_file_name = "cert.pem",
    .key_file_name = "key.pem"
    
}).get("/hello", [](auto *res, auto *req) {

    /* You can efficiently stream huge files too */
    res->writeHeader("Content-Type", "text/html; charset=utf-8")->end("Hello HTTP!");
    
}).ws<UserData>("/*", {

    /* Just a few of the available handlers */
    .open = [](auto *ws, auto *req) {
        /* MQTT syntax */
        ws->subscribe("sensors/+/house");
    },
    .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
        ws->send(message, opCode);
    }
    
}).listen(9001, [](auto *listenSocket) {

    if (listenSocket) {
        std::cout << "Listening on port " << 9001 << std::endl;
    }
    
}).run();

💼 Commercially supported

uNetworking AB is a Swedish consulting & contracting company dealing with anything related to µWebSockets; development, support and customer success.

Don't hesitate sending a mail if you're building something large, in need of advice or having other business inquiries in mind. We'll figure out what's best for both parties and make sure you're not stepping into one of the many common pitfalls.

Special thanks to BitMEX, Bitfinex, Google, Coinbase, Bitwyre and deepstreamHub for allowing the project itself to thrive on GitHub since 2016 - this project would not be possible without these beautiful companies.

🧩 Pluggable architecture

µWebSockets builds on µSockets, a foundation library implementing eventing, networking and cryptography in three different layers. Every layer has multiple implementations and you control the compiled composition with flags.

In a nutshell:

  • WITH_WOLFSSL=1 WITH_LIBUV=1 make examples builds examples utilizing WolfSSL and libuv
  • WITH_OPENSSL=1 make examples builds examples utilizing OpenSSL and the native kernel

See µSockets for an up-to-date list of flags and a more detailed explanation.

🤝 Permissively licensed

Intellectual property, all rights reserved.

Apache License 2.0 is a permissive license with few limitations. Make sure you properly understand the concept of licenses and how they relate to copyright & trademark laws. If you're uncertain about your permissions, please ask before assuming.

You can’t perform that action at this time.