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 struct per_session_data__http {
43 * one of these is auto-created for each connection and a pointer to the
44 * appropriate instance is passed to the callback in the user parameter
46 * for this example protocol we use it to individualize the count for each
50 struct per_session_data__dumb_increment {
54 struct per_session_data__lws_mirror {
55 struct libwebsocket *wsi;
59 extern int callback_http(struct libwebsocket_context *context,
60 struct libwebsocket *wsi,
61 enum libwebsocket_callback_reasons reason,
62 void *user, void *in, size_t len);
63 extern int callback_lws_mirror(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_dumb_increment(struct libwebsocket_context *context,
68 struct libwebsocket *wsi,
69 enum libwebsocket_callback_reasons reason,
70 void *user, void *in, size_t len);
73 dump_handshake_info(struct libwebsocket *wsi);