2018-08-28 21:42:21 +02:00
2018-08-28 21:42:21 +02:00
2018-08-28 06:42:04 +02:00
2018-05-06 16:43:26 +02:00
2018-08-28 21:42:21 +02:00
2018-08-25 10:04:14 +02:00
2018-08-25 10:04:14 +02:00
2018-08-28 21:42:21 +02:00
2018-07-02 21:56:21 +02:00
2018-08-28 17:09:56 +02:00
2018-07-02 21:58:19 +02:00

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

Fancy pants details & user manual

Express yourself briefly.

uWS::App a; // or uWS::SSLApp(options) for SSL

a.onGet("/", [](auto *s, auto *req, auto *args) {

    s->writeStatus("200 OK")->writeHeader("Hello", "World")->end(buffer);
    
}).onGet("/largefile", [](auto *s, auto *req, auto *args) {

    s->write([](int offset) {
        return largeFile.substr(offset);
    }, fileSize);
    
}).onPost("/upload/:filename", [](auto *s, auto *req, auto *args) {

    s->read([std::ofstream fout = args[0]](int offset, auto chunk) {
        fout << chunk;
    });
    
}).onWebSocket<UserData>("/wsApi", [](auto *ws, auto *req, auto *args) {

    std::cout << "WebSocket connected to /wsApi" << std::endl;
    
}).onMessage([](auto *ws, auto message, auto opCode) {

    ws->send(message, opCode);
    
}).onClose([](auto *ws, int code, auto message) {

    std::cout << "WebSocket disconnected from /wsApi" << std::endl;
    
}).listen("localhost", 3000, 0);

Pay what you want.

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

Become a paying sponsor to unlock support, issue reporting, roadmaps and to drop suggestions.

Deploy like a boss.

Commercial support is available via a per-hourly consulting plan or as otherwise negotiated. If you're stuck, worried about design or just in need of help don't hesitate throwing me, the author a mail and we'll figure out what's best for both parties. I want your business to have a proper understanding of the problem before rushing in to one of the many pitfalls.

Excel across the board.

S
Description
No description provided
Readme Apache-2.0 2.5 MiB
Languages
C++ 81.9%
C 14.2%
Rust 1.8%
Makefile 1.4%
JavaScript 0.7%