Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
telemetry_server.cpp File Reference
#include <websocketpp/config/asio_no_tls.hpp>
#include <websocketpp/server.hpp>
#include <fstream>
#include <iostream>
#include <set>
#include <streambuf>
#include <string>
Include dependency graph for telemetry_server.cpp:

Go to the source code of this file.

Classes

class  telemetry_server
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 176 of file telemetry_server.cpp.

176 {
178
179 std::string docroot;
180 uint16_t port = 9002;
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
198 port = uint16_t(i);
199 }
200
201 s.run(docroot, port);
202 return 0;
203}
void run(std::string docroot, uint16_t port)
char ** argv
unsigned short uint16_t
Definition stdint.h:125
char * s
Here is the call graph for this function: