19 #ifndef _WEBSOCKETS_H_
20 #define _WEBSOCKETS_H_
24 #include <libwebsockets.h>
25 #include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
26 #include <boost/interprocess/sync/scoped_lock.hpp>
27 #include "abstractpropertytype.h"
29 using namespace boost::interprocess;
52 virtual void dataReceived(lws* socket,
const char*
data,
size_t len) = 0;
107 static int Write(lws *lws,
const std::string& strToWrite);
115 void addPoll(
int fd);
123 void removePoll(
int fd);
155 struct lws_protocols protocollist[2];
161 typedef std::unique_ptr<lws_context, decltype(&lws_context_destroy)> lwsContextPtr;
168 lwsContextPtr context;
175 std::map<int,GIOChannel*> m_ioChannelMap;
182 std::map<int,guint> m_ioSourceMap;
189 interprocess_recursive_mutex mutex;
192 #endif // _WEBSOCKETS_H_