struct lws_pollfd eventfd;
#if defined(WIN32) || defined(_WIN32)
- eventfd.fd = watcher->sock;
+ eventfd.fd = watcher->socket;
#else
eventfd.fd = watcher->io_watcher.fd;
#endif
* We have to do it here because the uv loop(s) are not
* initialized until after context creation.
*/
+
if (wsi) {
wsi->w_read.context = context;
- uv_poll_init(pt->io_loop_uv, &wsi->w_read.uv_watcher,
+ uv_poll_init_socket(pt->io_loop_uv, &wsi->w_read.uv_watcher,
pt->lserv_fd);
uv_poll_start(&wsi->w_read.uv_watcher, UV_READABLE,
lws_io_cb);
struct lws_context *context = lws_get_context(wsi);
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
#if defined(WIN32) || defined(_WIN32)
- int current_events = wsi->w_read.uv_watcher.io.events &
+ int current_events = wsi->w_read.uv_watcher.events &
(UV_READABLE | UV_WRITABLE);
#else
int current_events = wsi->w_read.uv_watcher.io_watcher.pevents &
}
}
-#if !defined(LWS_NO_DAEMONIZE) && !defined(WIN32)
+#if !defined(WIN32)
+#if !defined(LWS_NO_DAEMONIZE)
/*
* normally lock path would be /var/lock/lwsts or similar, to
* simplify getting started without having to take care about
/* we will only try to log things according to our debug_level */
setlogmask(LOG_UPTO (LOG_DEBUG));
openlog("lwsts", syslog_options, LOG_DAEMON);
+#endif
/* tell the library what debug level to emit and to send it to syslog */
lws_set_log_level(debug_level, lwsl_emit_syslog);