https://github.com/uNetworking/uWebSockets Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} uNetworking / uWebSockets Public * Notifications * Fork 1.6k * Star 14.6k Simple, secure & standards compliant web server for the most demanding of applications License Apache-2.0 license 14.6k stars 1.6k forks Star Notifications * Code * Issues 20 * Pull requests 6 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights uNetworking/uWebSockets This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 10 branches 138 tags Code * Clone HTTPS GitHub CLI [https://github.com/u] Use Git or checkout with SVN using the web URL. [gh repo clone uNetwo] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @uNetworkingAB uNetworkingAB Update HttpParser.h ... d174a7e Oct 25, 2022 Update HttpParser.h d174a7e Git stats * 872 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Run tests on GH Actions Feb 21, 2021 benchmarks Take some from jarred Oct 23, 2022 capi Add rust experiment example Jan 7, 2022 cluster Create README.md Apr 13, 2021 examples The rules are way simpler than so Oct 22, 2022 fuzzing Experimental parser optimizations Oct 2, 2022 misc Wrap more h3, bump uSockets, remove old stuff, add SSL cert Aug 28, 2022 src Update HttpParser.h Oct 24, 2022 tests Do not expect a trailer after chunked body Oct 18, 2022 uSockets @ 5097417 Bump uSockets Oct 11, 2022 .gitmodules Remove libdeflate May 2, 2022 CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jul 28, 2022 LICENSE Apache License 2.0 Oct 28, 2018 Makefile Add Crc32 hashing example Oct 8, 2022 README.md Update README.md Oct 23, 2022 View code Optimized security >[?] Rapid scripting [?][?] Battle proven Batteries included Commercially supported Customizable architecture Permissively licensed README.md [logo] Simple, secure^1 & standards compliant^2 web server for the most demanding^3 of applications. Read more... [6874747073] Language grade: C/C++ [6874747073] [6874747073] Optimized security Being meticulously optimized for speed and memory footprint, uWebSockets 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 ~95% daily fuzzing coverage^4 with no sanitizer issues. LGTM scores us flawless A+ from having zero CodeQL alerts and we compile with pedantic warning levels. >[?] Rapid scripting uWebSockets is written entirely in C & C++ but has a seamless integration for Node.js backends. This allows for rapid scripting of powerful apps, using widespread competence. See uWebSockets.js. Besides this Node.js integration, you can also use Bun where uWebSockets is the built-in web server. [?][?] Battle proven We've been fully standards compliant with a perfect Autobahn| Testsuite score since 2016^2. uWebSockets powers many of the biggest crypto exchanges in the world, handling trade volumes of multiple billions of USD every day. If you trade crypto, chances are you do so via uWebSockets. Batteries included Designed around a convenient URL router with wildcard & parameter support - paired with efficient pub/sub features for WebSockets. uWebSockets should be the obvious, complete starting point for any real-time web project with high demands. Start building your Http & WebSocket apps in no time; read the user manual and see examples. You can browse our TypeDoc for a quick overview. uWS::SSLApp({ /* These are the most common options, fullchain and key. See uSockets for more options. */ .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("/*", { /* Just a few of the available handlers */ .open = [](auto *ws) { ws->subscribe("oh_interesting_subject"); }, .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; } else { std::cout << "Failed to load certs or to bind to port" << std::endl; } }).run(); Commercially supported uNetworking AB is a Swedish consulting & contracting company dealing with anything related to uWebSockets; 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 falling into common pitfalls. Special thanks to BitMEX, Bitfinex, Google, Coinbase, Bitwyre, AppDrag and deepstreamHub for allowing the project itself to thrive on GitHub since 2016 - this project would not be possible without these beautiful companies. Customizable architecture uWebSockets builds on uSockets, 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. There are currently five event-loop integrations; libuv, ASIO, GCD and raw epoll/kqueue. 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 uSockets for an up-to-date list of flags and a more detailed explanation. Permissively licensed Intellectual property, all rights reserved. Where such explicit notice is given, source code is licensed Apache License 2.0 which is a permissive OSI-approved license with very few limitations. Modified "forks" should be of nothing but licensed source code, and be made available under another product name. If you're uncertain about any of this, please ask before assuming. About Simple, secure & standards compliant web server for the most demanding of applications Topics http router cross-platform websockets pubsub commercial proxy-protocol Resources Readme License Apache-2.0 license Code of conduct Code of conduct Stars 14.6k stars Watchers 413 watching Forks 1.6k forks Releases 161 v20.26.0 Latest Oct 24, 2022 + 160 releases Contributors 79 * @uNetworkingAB * @agauniyal * @lpinca * @silverwind * @kapouer * @chemhack * @utensil * @sanderploegsma * @not-implemented * @jimmyt857 * @jgilje + 68 contributors Languages * C++ 91.0% * C 6.4% * Makefile 1.8% * Rust 0.8% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.