Skip to content

Instantly share code, notes, and snippets.

View iONinja's full-sized avatar

iO Ninja iONinja

View GitHub Profile

Keybase proof

I hereby claim:

  • I am iONinja on github.
  • I am ioninja (https://keybase.io/ioninja) on keybase.
  • I have a public key whose fingerprint is F884 D032 D01A 136E 5AB3 6D62 5224 2318 7D79 7ABB

To claim this, I am signing this object:

@iONinja
iONinja / uws.cpp
Last active April 18, 2020 04:53
An example of using µWebSockets in a C++ server
#include <uWS/uWS.h>
#include <iostream>
unsigned long getTime();
int main(int argc, char *argv[]) {
uWS::Hub h;
h.onMessage([](uWS::WebSocket<uWS::SERVER> *ws, char *data, size_t length, uWS::OpCode opCode) {