uNetworking /uWebSockets
Simple, secure & standards compliant web server for the most demanding of applications
★ 19,026⑂ 1,870👁 387⑃ 370● 578▤ 218
More from this author
+2
Daily
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
#1280HTTP341 comments · 2021-07-05#1910maxRemainingBodyLength() as separate call21 comments · 2024-08-21#1603io_uring new uSockets backend14 comments · 2023-05-06#1491Fragmented send (todo: compression)11 comments · 2021-10-29#1887Stopping http takes 1 second10 comments · 2025-08-27#1132Print warnings on not being able to load certificates9 comments · 2020-11-27#1863Double-Free of UserData when gracefully closing a Websocket from Server-Side8 comments · 2025-06-12#1714Proxy protocol support does not handle proxy payload arriving before TLS8 comments · 2024-02-22
Discussions
#1934Backpressure questions3 comments · 2026-08-06#1900How can I embed uWebSockets in a Qt6 console application so that it does not block the main app?2 comments · 2025-12-04#1890Is TCP_NODELAY enabled by default0 comments · 2025-09-20#1889How does licensing work?1 comments · 2025-09-11#1884Efficient live data - defer?1 comments · 2025-08-20#1869Struggle to benchmark uWS2 comments · 2025-06-24#1868Exception: Exception 0x80000003 encountered at address 0x7ff9db8a09481 comments · 2025-06-09#1859uWebsockets inconsistently prematurely closes connection while reading response headers with nginx ingress and ssl passthrough1 comments · 2025-05-28
Latest release
v20.81.0 v20.81.0 2026-10-26Standards 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