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;
39 #define __func__ __FUNCTION__
42 struct per_session_data__http {
47 * one of these is auto-created for each connection and a pointer to the
48 * appropriate instance is passed to the callback in the user parameter
50 * for this example protocol we use it to individualize the count for each
54 struct per_session_data__dumb_increment {
58 struct per_session_data__lws_mirror {
59 struct libwebsocket *wsi;
63 extern int callback_http(struct libwebsocket_context *context,
64 struct libwebsocket *wsi,
65 enum libwebsocket_callback_reasons reason,
66 void *user, void *in, size_t len);
67 extern int callback_lws_mirror(struct libwebsocket_context *context,
68 struct libwebsocket *wsi,
69 enum libwebsocket_callback_reasons reason,
70 void *user, void *in, size_t len);
71 extern int callback_dumb_increment(struct libwebsocket_context *context,
72 struct libwebsocket *wsi,
73 enum libwebsocket_callback_reasons reason,
74 void *user, void *in, size_t len);
77 dump_handshake_info(struct libwebsocket *wsi);