mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 06:27:49 +00:00
2dd12fcbb6
closes #1315
26 lines
756 B
C++
26 lines
756 B
C++
/*************************************************************************
|
|
PURPOSE: (Represent the state of a variable server websocket connection.)
|
|
**************************************************************************/
|
|
#ifndef TIMESESSION_HH
|
|
#define TIMESESSION_HH
|
|
#include <vector>
|
|
#include <string>
|
|
#include "time.h"
|
|
#include "trick/WebSocketSession.hh"
|
|
|
|
class TimeSession : public WebSocketSession {
|
|
public:
|
|
enum Zone { GMT, LOCAL};
|
|
TimeSession(struct mg_connection *nc);
|
|
~TimeSession();
|
|
void marshallData();
|
|
void sendMessage();
|
|
int handleMessage(const std::string&);
|
|
private:
|
|
time_t now;
|
|
Zone zone;
|
|
};
|
|
|
|
WebSocketSession* makeTimeSession( struct mg_connection *nc );
|
|
#endif
|