Skip to content
Permalink
Browse files

Clean up root, remove CMake, remove Meson

  • Loading branch information...
alexhultman committed Feb 27, 2017
1 parent 1e79517 commit c28ac971953a11569a5b1c2437abea5dbcd6f6ed
@@ -1,2 +1,2 @@
autobahn/* linguist-vendored
misc/* linguist-vendored
*.h linguist-language=C++

This file was deleted.

@@ -1,7 +1,7 @@
<div align="center"><img src="images/logo.png"/></div>
<div align="center"><img src="misc/images/logo.png"/></div>
`µWS` is one of the most lightweight, efficient & scalable WebSocket & HTTP server implementations available. It features an easy-to-use, fully async object-oriented interface and scales to millions of connections using only a fraction of memory compared to the competition. While performance and scalability are two of our top priorities, we consider security, stability and standards compliance paramount. License is zlib/libpng (very permissive & suits commercial applications).

* Autobahn tests [all pass](http://htmlpreview.github.io/?https://github.com/uWebSockets/uWebSockets/blob/master/autobahn/index.html).
* Autobahn tests [all pass](http://htmlpreview.github.io/?https://github.com/uWebSockets/uWebSockets/blob/master/misc/autobahn/index.html).
* One million WebSockets require ~168mb of user space memory (~176 bytes per WebSocket).
* By far one of the fastest in both HTTP and WebSocket throughput (see table below).
* Linux, OS X & Windows support.
@@ -11,7 +11,7 @@
* Multi-core friendly.
* Has a Node.js binding (npm install uws).

[![npm version](https://badge.fury.io/js/uws.svg)](https://badge.fury.io/js/uws) [![](https://api.travis-ci.org/uWebSockets/uWebSockets.svg?branch=master)](https://travis-ci.org/uWebSockets/uWebSockets) [![](images/patreon.png)](https://www.patreon.com/uWebSockets)
[![npm version](https://badge.fury.io/js/uws.svg)](https://badge.fury.io/js/uws) [![](https://api.travis-ci.org/uWebSockets/uWebSockets.svg?branch=master)](https://travis-ci.org/uWebSockets/uWebSockets) [![](misc/images/patreon.png)](https://www.patreon.com/uWebSockets)

## Benchmarks table - [validate](https://github.com/alexhultman/uWebSockets/tree/master/benchmarks#websocket-echo-server-benchmarks)
Implementation | User space memory scaling | Connection performance | Short message throughput | Huge message throughput
@@ -28,16 +28,16 @@ WebSocket++ v0.7.0 | µWS is **63x** as lightweight :-1: | µWS is **4x** as per
*Benchmarks are run with default settings in all libraries, except for `ws` which is run with the native performance addons. These results were achieved with the native C++ server, not the Node.js addon. Expect worse performance and scalability when using Node.js (don't worry, the Node.js addon will run circles around `ws`).*

### HTTP benchmarks
![](images/wrk_benchmark.png)
![](misc/images/wrk_benchmark.png)

*HTTP 1.1 benchmark using wrk. All servers but Apache are single threaded and all serve a static page with no PHP, database queries or similar. Apache performance is estimated by dividing its multi-process performance by number of CPU cores.*

![](images/pipelining_benchmark.png)
![](misc/images/pipelining_benchmark.png)

*Experimental HTTP 1.1 benchmark using wrk + Japronto's own (ridiculous) pipeline script.*

## Built with µWS
<div align="center"><img src="images/builtwithuws.png"/></div>
<div align="center"><img src="misc/images/builtwithuws.png"/></div>

## Usage

This file was deleted.

@@ -1,4 +1,4 @@
#include <uWS.h>
#include <uWS/uWS.h>

int main()
{

This file was deleted.

@@ -1,4 +1,4 @@
#include <uWS.h>
#include <uWS/uWS.h>
#include <iostream>
#include <string>
#include <thread>

This file was deleted.

@@ -1,6 +1,6 @@
{
"options": {"failByDrop": false},
"outdir": "./autobahn",
"outdir": "./misc/autobahn",

"servers": [
{"agent": "&#181;WebSockets SSL",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -50,8 +50,8 @@ void serveAutobahn() {
}
});

uS::TLS::Context c = uS::TLS::createContext("ssl/cert.pem",
"ssl/key.pem",
uS::TLS::Context c = uS::TLS::createContext("misc/ssl/cert.pem",
"misc/ssl/key.pem",
"1234");
if (!h.listen(3001, c, 0, sslGroup) || !h.listen(3000, nullptr, 0, group)) {
std::cout << "FAILURE: Error listening for Autobahn connections!" << std::endl;
@@ -61,14 +61,14 @@ void serveAutobahn() {
}

std::thread t([]() {
system("wstest -m fuzzingclient -s Autobahn.json");
system("wstest -m fuzzingclient -s misc/Autobahn.json");
});

h.run();
t.join();

// "FAILED", "OK", "NON-STRICT"
std::ifstream fin("/home/alexhultman/uWebSockets/autobahn/index.json");
std::ifstream fin("misc/autobahn/index.json");
fin.seekg (0, fin.end);
int length = fin.tellg();
fin.seekg (0, fin.beg);
@@ -109,8 +109,8 @@ void measureInternalThroughput(unsigned int payloadLength, int echoes, bool ssl)
const char *closeMessage = "I'm closing now";
size_t closeMessageLength = strlen(closeMessage);

uS::TLS::Context c = uS::TLS::createContext("ssl/cert.pem",
"ssl/key.pem",
uS::TLS::Context c = uS::TLS::createContext("misc/ssl/cert.pem",
"misc/ssl/key.pem",
"1234");

h.onConnection([payload, payloadLength, echoes](uWS::WebSocket<uWS::CLIENT> ws, uWS::HttpRequest req) {
@@ -525,8 +525,8 @@ void testMultithreading() {

if (ssl) {
if (!h.listen(3000,
uS::TLS::createContext("ssl/cert.pem",
"ssl/key.pem", "1234"))) {
uS::TLS::createContext("misc/ssl/cert.pem",
"misc/ssl/key.pem", "1234"))) {
std::cerr << "FAILURE: Cannot listen!" << std::endl;
exit(-1);
}

This file was deleted.

@@ -0,0 +1,40 @@
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp \
../src/WebSocketImpl.cpp \
../src/Networking.cpp \
../src/Hub.cpp \
../src/Node.cpp \
../src/WebSocket.cpp \
../src/HTTPSocket.cpp \
../src/Socket.cpp \
../src/Group.cpp \
../src/Extensions.cpp \
../src/Epoll.cpp

HEADERS += ../src/WebSocketProtocol.h \
../src/Networking.h \
../src/WebSocket.h \
../src/Hub.h \
../src/Group.h \
../src/Node.h \
../src/Socket.h \
../src/HTTPSocket.h \
../src/uWS.h \
../src/Extensions.h \
../src/Libuv.h \
../src/Backend.h \
../src/Epoll.h \
../src/Asio.h

LIBS += -lasan -lssl -lcrypto -lz -lpthread -luv -lboost_system

QMAKE_CXXFLAGS += -fsanitize=address -Wno-unused-parameter
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE *= -O3 -g

INCLUDEPATH += ../src

This file was deleted.

0 comments on commit c28ac97

Please sign in to comment.
You can’t perform that action at this time.