From 9f9189a42068d086edac53cea5b9f5d6bacb5357 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 29 Jan 2013 06:52:00 +0800 Subject: [PATCH] trac 6 expose libwebsockets read with note about not normally needed Comes in handy if the original application poll loop is the boss, in this case libwebsockets is optional and can't be the boss poll loop Requested-by: ajandhyala@wms.com Signed-off-by: Andy Green --- lib/libwebsockets.h | 10 ++++++++++ lib/private-libwebsockets.h | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index fadbdd1..4d3342c 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -885,6 +885,16 @@ lws_b64_encode_string(const char *in, int in_len, char *out, int out_size); LWS_EXTERN int lws_b64_decode_string(const char *in, char *out, int out_size); +/* + * Note: this is not normally needed as a user api. It's provided in case it is + * useful when integrating with other app poll loop service code. + */ + +LWS_EXTERN int +libwebsocket_read(struct libwebsocket_context *context, + struct libwebsocket *wsi, + unsigned char *buf, size_t len); + #ifndef LWS_NO_EXTENSIONS LWS_EXTERN struct libwebsocket_extension libwebsocket_internal_extensions[]; #endif diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index ee5f175..7e42202 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -389,11 +389,6 @@ libwebsocket_interpret_incoming_packet(struct libwebsocket *wsi, unsigned char *buf, size_t len); extern int -libwebsocket_read(struct libwebsocket_context *context, - struct libwebsocket *wsi, - unsigned char *buf, size_t len); - -extern int lws_b64_selftest(void); extern struct libwebsocket * -- 2.7.4