Skip to content
Snippets Groups Projects
Commit 508946ce authored by Andy Green's avatar Andy Green
Browse files

api make close api private only

parent 70edd6fb
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,11 @@ User api removals
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
------------
......
......@@ -917,10 +917,6 @@ libwebsockets_get_peer_addresses(struct libwebsocket_context *context,
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);
......
......@@ -401,6 +401,10 @@ struct libwebsocket {
#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,
......
......@@ -287,8 +287,7 @@ callback_dumb_increment(struct libwebsocket_context *context,
}
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment