#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>
#include <fstream>
#include <iostream>
#include <set>
#include <streambuf>
#include <string>
Go to the source code of this file.
◆ main()
int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 176 of file telemetry_server.cpp.
176 {
178
179 std::string docroot;
181
182 if (argc == 1) {
183 std::cout << "Usage: telemetry_server [documentroot] [port]" << std::endl;
184 return 1;
185 }
186
187 if (argc >= 2) {
188 docroot = std::string(
argv[1]);
189 }
190
191 if (argc >= 3) {
192 int i = atoi(
argv[2]);
193 if (i <= 0 || i > 65535) {
194 std::cout << "invalid port" << std::endl;
195 return 1;
196 }
197
199 }
200
201 s.
run(docroot, port);
202 return 0;
203}
void run(std::string docroot, uint16_t port)