Update front page some more

This commit is contained in:
Alex Hultman
2018-08-26 21:49:45 +02:00
parent 5889a2ec33
commit 46d54ad82f
+21 -23
View File
@@ -1,10 +1,12 @@
<div align="center"><img src="logo.png"/></div> <div align="center">
<img src="logo.png" />
µWS ("[micro](https://en.wikipedia.org/wiki/Micro-)WS") is simple and efficient message passing for the modern web. *µWS ("[micro](https://en.wikipedia.org/wiki/Micro-)WS") is simple and efficient message passing for the modern web.*
• [Fancy pants details & user manual](http://)
* Read the [fancy pants details & user manual](https://todo.sometime). </div>
#### Build optimized, standard web clients & servers in no time. #### Time is of the essence.
```c++ ```c++
uWS::App a; // or uWS::SSLApp(options) for SSL uWS::App a; // or uWS::SSLApp(options) for SSL
@@ -15,42 +17,38 @@ a.onGet("/", [](auto *s, auto *req, auto *args) {
}).onGet("/largefile", [](auto *s, auto *req, auto *args) { }).onGet("/largefile", [](auto *s, auto *req, auto *args) {
s->write([](int offset) { s->write([](int offset) {
// stream chunks of the large file return largeFile.substr(offset);
}, fileSize); }, fileSize);
}).onPost("/upload/:filename", [](auto *s, auto *req, auto *args) { }).onPost("/upload/:filename", [](auto *s, auto *req, auto *args) {
s->read([std::string filename = args[0]](int offset, auto chunk) { s->read([std::ofstream fout = args[0]](int offset, auto chunk) {
// stream chunks of data in to database with filename fout << chunk;
}); });
}).onWebSocket("/wsApi", [](auto *protocol) { }).onWebSocket<UserData>("/wsApi", [](auto *ws, auto *req, auto *args) {
protocol->onConnection([](auto *ws) { std::cout << "WebSocket connected to /wsApi" << std::endl;
// store this websocket somewhere }).onMessage([](auto *ws, auto message, auto opCode) {
})->onMessage([](auto *ws, auto message, auto opCode) { ws->send(message, opCode);
ws->send(message, opCode); }).onClose([](auto *ws, int code, auto message) {
})->onDisconnection([]() { std::cout << "WebSocket disconnected from /wsApi" << std::endl;
// remove this websocket
});
}).listen("localhost", 3000, 0); }).listen("localhost", 3000, 0);
``` ```
#### Deploy with confidence. #### In more than one way.
Feeling uncertain about your design? In need of professional help? Want to talk about the weather? I might have a few consulting hours for you and your business, send [me, the author](https://github.com/alexhultman) a mail and we'll figure out the rest. ![](https://github.com/uNetworking/uWebSockets/raw/master/misc/images/overview.png)
#### Excel across the board.
<todo: insert new image here>
#### Pay what you want. #### Pay what you want.
A free & open source ([Zlib](LICENSE)) project since 2016. Kindly sponsored by [BitMEX](https://bitmex.com), [Bitfinex](https://bitfinex.com) & [Coinbase](https://www.coinbase.com/) in 2018. A free & open source ([Zlib](LICENSE)) project since 2016. Kindly sponsored by [BitMEX](https://bitmex.com), [Bitfinex](https://bitfinex.com) & [Coinbase](https://www.coinbase.com/) in 2018.
<div align="center"><img src="2018.png"/></div> <div align="center"><img src="2018.png"/></div>
*Become a paying sponsor of the project to unlock support, issue reporting, roadmaps and to drop suggestions.* *Become a paying sponsor to unlock support, issue reporting, roadmaps and to drop suggestions.*
#### Stay confident.
If you're stuck, worried about design or just need help I might have a few consulting hours for you and your business. Throw [me, the author](https://github.com/alexhultman) a mail and we'll figure out the rest.