1 #if defined(_WIN32) && defined(EXTERNAL_POLL)
3 #define _WIN32_WINNT 0x0600
4 #define poll(fdArray, fds, timeout) WSAPoll((LPWSAPOLLFD)(fdArray), (ULONG)(fds), (INT)(timeout))
7 #include "lws_config.h"
18 #include "../lib/libwebsockets.h"
22 #include "gettimeofday.h"
29 extern int close_testing;
30 extern int max_poll_elements;
33 extern struct lws_pollfd *pollfds;
34 extern int *fd_lookup;
35 extern int count_pollfds;
37 extern volatile int force_exit;
38 extern struct lws_context *context;
39 extern char *resource_path;
41 extern void test_server_lock(int care);
42 extern void test_server_unlock(int care);
45 #define __func__ __FUNCTION__
48 struct per_session_data__http {
53 * one of these is auto-created for each connection and a pointer to the
54 * appropriate instance is passed to the callback in the user parameter
56 * for this example protocol we use it to individualize the count for each
60 struct per_session_data__dumb_increment {
64 struct per_session_data__lws_mirror {
70 callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user,
71 void *in, size_t len);
73 callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
74 void *user, void *in, size_t len);
76 callback_dumb_increment(struct lws *wsi, enum lws_callback_reasons reason,
77 void *user, void *in, size_t len);
80 dump_handshake_info(struct lws *wsi);