1 #include "lws_config.h"
12 #include "../lib/libwebsockets.h"
19 #include "gettimeofday.h"
26 extern int close_testing;
27 extern int max_poll_elements;
30 extern struct libwebsocket_pollfd *pollfds;
31 extern int *fd_lookup;
32 extern int count_pollfds;
34 extern volatile int force_exit;
35 extern struct libwebsocket_context *context;
36 extern char *resource_path;
38 extern void test_server_lock(int care);
39 extern void test_server_unlock(int care);
42 #define __func__ __FUNCTION__
45 struct per_session_data__http {
50 * one of these is auto-created for each connection and a pointer to the
51 * appropriate instance is passed to the callback in the user parameter
53 * for this example protocol we use it to individualize the count for each
57 struct per_session_data__dumb_increment {
61 struct per_session_data__lws_mirror {
62 struct libwebsocket *wsi;
66 extern int callback_http(struct libwebsocket_context *context,
67 struct libwebsocket *wsi,
68 enum libwebsocket_callback_reasons reason,
69 void *user, void *in, size_t len);
70 extern int callback_lws_mirror(struct libwebsocket_context *context,
71 struct libwebsocket *wsi,
72 enum libwebsocket_callback_reasons reason,
73 void *user, void *in, size_t len);
74 extern int callback_dumb_increment(struct libwebsocket_context *context,
75 struct libwebsocket *wsi,
76 enum libwebsocket_callback_reasons reason,
77 void *user, void *in, size_t len);
80 dump_handshake_info(struct libwebsocket *wsi);