uNetworking /uWebSockets

Simple, secure & standards compliant web server for the most demanding of applications

★ 19,026⑂ 1,870👁 387⑃ 370● 578▤ 218
C++Apache-2.0Created 2016-03-21
下载:v20.81.0v20.81.0 ↓20.81.02026-10-26
+2
日增长
19,026
stars
1,870
forks
387
watchers
370
prs
578
issues
218
releases

README

Simple, secure1 & standards compliant2 web server for the most demanding3 of applications. Read more...


  




 :closed_lock_with_key: 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 messaging3.

Furthermore, we partake in Google's OSS-Fuzz with a ~95% daily fuzzing coverage4 with no sanitizer issues. LGTM scores us flawless A+ from having zero CodeQL alerts and we compile with pedantic warning levels.


 :arrow_forward: Rapid scripting
µWebSockets 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 µWebSockets.js.

 :crossed_swords: Battle proven
We've been fully standards compliant with a perfect Autobahn|Testsuite score since 20162. µWebSockets 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 µWebSockets.

 :battery: Batteries included
Designed around a convenient URL router with wildcard & parameter support - paired with efficient pub/sub features for WebSockets. µWebSockets 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.

c++
/ One app per thread; spawn as many as you have CPU-cores and let uWS share the listening port /
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/:name",  {

    / You can efficiently stream huge files too /
    res-writeStatus("200 OK")
       -writeHeader("Content-Type", "text/html; charset=utf-8")
       -write("Hello ")
       -write(req-getParameter("name"))
       -end("!");
    
}).ws("/", {

    / Just a few of the available handlers /
    .open =  {
        ws-subscribe("oh_interesting_subject");
    },
    .message =  {
        ws-send(message, opCode);
    }
    
}).listen(9001,  {

    if (listenSocket) {
        std::cout 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 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.

 :wrench: Customizable architecture
µWebSockets builds on µSockets, a 

Top issues

Discussions

Latest release

v20.81.0 v20.81.0 2026-10-26
Standards compliance & bug fixes

We now score 158/159 in the external Http11Probe standards compliance test. The last remaining check is skipped due to being out-of-scope:



 What's Changed
 Accept any transfer-encoding ending in chunked by @cpruijsen in https://github.com/uNetworking/uWebSockets/pull/1943
 Add missing cstdint include for uint64_t by @glingy in https://github.com/uNetworking/uWebSockets/pull/1860
 Support valueless queries by @Dev-next-gen in https://github.com/uNetworking/uWebSockets/pull/1944
 Copilot/add 502 bad gateway error page by @uNetworkingAB in https://gi

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON