Add the WebSocketSession base class. #847 #730

This commit is contained in:
Penn, John M 047828115 2019-08-19 15:17:14 -05:00
parent c1cbb2ffaa
commit 2428ef3392

View File

@ -0,0 +1,22 @@
/*************************************************************************
PURPOSE: (Represent Websocket variable server connection.)
LIBRARY DEPENDENCIES:
( (../src/WSSession.o))
**************************************************************************/
#ifndef WEB_SOCKET_SESSION_HH
#define WEB_SOCKET_SESSION_HH
#include <string>
#include <mongoose.h>
class WebSocketSession {
public:
WebSocketSession(struct mg_connection *nc):connection(nc){};
virtual ~WebSocketSession() {};
virtual void stageData()=0;
virtual void sendMessage()=0;
virtual int handleMessage(std::string)=0;
struct mg_connection* connection;
};
#endif