connection you must do so from the user callback and by returning
-1 from there.
+ - libwebsocket_close_and_free_session() is now private to the library code
+ only and not exposed for user code. If you want to close the
+ connection, you must do so from the user callback by returning -1
+ from there.
+
New features
------------
struct libwebsocket *wsi, int fd, char *name, int name_len,
char *rip, int rip_len);
-LWS_EXTERN void
-libwebsocket_close_and_free_session(struct libwebsocket_context *context,
- struct libwebsocket *wsi, enum lws_close_status);
-
LWS_EXTERN int
libwebsockets_get_random(struct libwebsocket_context *context,
void *buf, int len);
#endif
};
+extern void
+libwebsocket_close_and_free_session(struct libwebsocket_context *context,
+ struct libwebsocket *wsi, enum lws_close_status);
+
#ifndef LWS_LATENCY
static inline void lws_latency(struct libwebsocket_context *context,
struct libwebsocket *wsi, const char *action,
}
if (close_testing && pss->number == 50) {
lwsl_info("close tesing limit, closing\n");
- libwebsocket_close_and_free_session(context, wsi,
- LWS_CLOSE_STATUS_NORMAL);
+ return -1;
}
break;