blob: 2093ac5468fb9a61ddf7cd66c4e0089405cdfb71 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// This example is broken and doesn't do anything. It is a potential interface for a future potential client.
#include "ClientApp.h"
#include <iostream>
int main() {
uWS::ClientApp app({
.open = [](/*auto *ws*/) {
std::cout << "Hello and welcome to client" << std::endl;
},
.message = [](/*auto *ws, auto message*/) {
},
.close = [](/*auto *ws*/) {
std::cout << "bye" << std::endl;
}
});
app.connect("ws://localhost:3000", "protocol");
app.run();
}
|