diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-06-12 14:37:12 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-06-12 14:37:12 (GMT) |
commit | bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557 (patch) | |
tree | 5c3e73450534bd8b4279d20f0171dcfb45167786 /src/uscxml/server | |
parent | 090016a3f5bcd66d6265fe1504430430f1dee7ed (diff) | |
download | uscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.zip uscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.tar.gz uscxml-bfdd2f8e72005d1e2ef2a87d19d8ac242bb22557.tar.bz2 |
respond element and proper http ioproc
Diffstat (limited to 'src/uscxml/server')
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 28 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.h | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index faf91d8..cee8325 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -72,12 +72,12 @@ extern "C" { namespace uscxml { static void dummyCallback(evutil_socket_t fd, short what, void *arg) { - // see comments in BasicDelayedEventQueue::run - timeval tv; - tv.tv_sec = 365 * 24 * 3600; - tv.tv_usec = 0; - event *ev = *(event **)arg; - evtimer_add(ev, &tv); + // see comments in BasicDelayedEventQueue::run + timeval tv; + tv.tv_sec = 365 * 24 * 3600; + tv.tv_usec = 0; + event *ev = *(event **)arg; + evtimer_add(ev, &tv); } HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* sslConf) { @@ -88,11 +88,11 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss _thread = NULL; _httpHandle = NULL; - timeval tv; - tv.tv_sec = 365 * 24 * 3600; - tv.tv_usec = 0; - _dummyEvent = evtimer_new(_base, dummyCallback, &_dummyEvent); - evtimer_add(_dummyEvent, &tv); + timeval tv; + tv.tv_sec = 365 * 24 * 3600; + tv.tv_usec = 0; + _dummyEvent = evtimer_new(_base, dummyCallback, &_dummyEvent); + evtimer_add(_dummyEvent, &tv); #ifdef _WIN32 _wsHandle = NULL; @@ -755,10 +755,10 @@ void HTTPServer::run(void* instance) { // event_base_loop(INSTANCE->_base, EVLOOP_ONCE | EVLOOP_NO_EXIT_ON_EMPTY); // event_base_dispatch(INSTANCE->_base); - // BasicDelayedEventQueue::run - event_base_loop(INSTANCE->_base, EVLOOP_ONCE); + // BasicDelayedEventQueue::run + event_base_loop(INSTANCE->_base, EVLOOP_ONCE); - } + } LOGD(USCXML_INFO) << "HTTP Server stopped" << std::endl; } diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h index 3d7f6b4..84caf9e 100644 --- a/src/uscxml/server/HTTPServer.h +++ b/src/uscxml/server/HTTPServer.h @@ -169,7 +169,7 @@ private: struct event_base* _base; struct evhttp* _http; struct evws* _evws; - struct event* _dummyEvent; + struct event* _dummyEvent; struct evhttp_bound_socket* _httpHandle; evutil_socket_t _wsHandle; |