Skip to content

Simple, secure & standards compliant web I/O for the most demanding of applications

License

Notifications You must be signed in to change notification settings

hoytech/uWebSockets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psst! v0.15 dropping in a few weeks with major perf. advancements (think at least 33% boost over v0.14).

µWS ("microWS") is simple and efficient messaging for the modern web.

Wiki pages & user manual

Build optimized WebSocket & HTTP servers & clients in no time.

#include <uWS/uWS.h>
using namespace uWS;

int main() {
    Hub h;
    std::string response = "Hello!";

    h.onMessage([](WebSocket<SERVER> *ws, char *message, size_t length, OpCode opCode) {
        ws->send(message, length, opCode);
    });

    h.onHttpRequest([&](HttpResponse *res, HttpRequest req, char *data, size_t length,
                        size_t remainingBytes) {
        res->end(response.data(), response.length());
    });

    if (h.listen(3000)) {
        h.run();
    }
}

Pay what you want.

A free & open source (Zlib) hobby project of mine since 2016. Kindly sponsored by BitMEX, Bitfinex & Coinbase in 2018.

Understand I don't take issue reports, suggestions or provide any support to free-riders. You want in? Become a sponsor.

Deploy with confidence.

Feeling uncertain about your design? In need of professional help? I might have a few consulting hours for you and your business, send me a mail and we'll figure out the rest.

Excel across the board.

Be fast, not broken.

Gracefully passes the entire Autobahn fuzzing test suite with no failures or Valgrind/ASAN errors. With or without SSL/permessage-deflate.

About

Simple, secure & standards compliant web I/O for the most demanding of applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 71.8%
  • C++ 27.6%
  • Makefile 0.3%
  • Go 0.1%
  • QMake 0.1%
  • JavaScript 0.1%