libwebsockets/lib
Andy Green 4e442b7743 lws_plat_fd implement platform default handlers
This is a rewrite of the patch from Soapyman here

https://github.com/warmcat/libwebsockets/pull/363

The main changes compared to Soapyman's original patch are

 - There's no new stuff in the info struct user code does any overrides
   it may want to do explicitly after lws_context_create returns

 - User overrides for file ops can call through (subclass) to the original
   platform implementation using lws_get_fops_plat()

 - A typedef is provided for plat-specific fd type

 - Public helpers are provided to allow user code to be platform-independent
   about file access, using the lws platform file operations underneath:

static inline lws_filefd_type
lws_plat_file_open(struct lws_plat_file_ops *fops, const char *filename,
		   unsigned long *filelen, int flags)

static inline int
lws_plat_file_close(struct lws_plat_file_ops *fops, lws_filefd_type fd)

static inline unsigned long
lws_plat_file_seek_cur(struct lws_plat_file_ops *fops, lws_filefd_type fd,
		       long offset_from_cur_pos)

static inline int
lws_plat_file_read(struct lws_plat_file_ops *fops, lws_filefd_type fd,
		   unsigned long *amount, unsigned char *buf, unsigned long len)

static inline int
lws_plat_file_write(struct lws_plat_file_ops *fops, lws_filefd_type fd,
		    unsigned long *amount, unsigned char *buf, unsigned long len)

There's example documentation and implementation in the test server.

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-10 11:01:59 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
alloc.c Subject: [PATCH] Add custom allocator support using the realloc() interface 2014-12-05 07:25:24 +08:00
base64-decode.c mbed3 warning cleaning 2015-11-14 16:31:01 +08:00
client-handshake.c Subject: [PATCH] fixed not to use IPv4-mapped address for IPv6 only node 2015-12-09 19:04:17 +08:00
client-parser.c clean more whitespace 3 2015-12-06 08:40:00 +08:00
client.c clean more whitespace 5 2015-12-06 10:05:37 +08:00
context.c plat combine inits into single lws_plat_init and provide info 2015-12-10 07:14:16 +08:00
daemonize.c clean more whitespace 3 2015-12-06 08:40:00 +08:00
extension-deflate-frame.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
extension-deflate-frame.h api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
extension-deflate-stream.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
extension-deflate-stream.h api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
extension.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
getifaddrs.c Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
getifaddrs.h Use LWS_HAVE_ instead of just HAVE_ 2015-10-12 09:53:17 +08:00
handshake.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
header.c clean more whitespace 3 2015-12-06 08:40:00 +08:00
hpack.c clean more whitespace 5 2015-12-06 10:05:37 +08:00
http2.c clean more whitespace 5 2015-12-06 10:05:37 +08:00
huftable.h http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
lextable-strings.h Add PATCH, PUT, DELETE methods 2015-01-26 11:25:13 +08:00
lextable.h Add PATCH, PUT, DELETE methods 2015-01-26 11:25:13 +08:00
libev.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
libwebsockets.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
libwebsockets.h lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
lws-plat-mbed3.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
lws-plat-mbed3.cpp cleanups after api changes and mbed update 2015-12-04 16:54:12 +08:00
lws-plat-unix.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
lws-plat-win.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
minihuf.c http2 hpack basic decode ok including huff 2014-10-12 08:38:16 +08:00
minilex.c http2 able to send test.html to nghttp2 2014-10-12 14:31:47 +08:00
output.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
parsers.c clean tidy the worst whitespace alignment probs due to mass token name length changes 2015-12-04 11:30:53 +08:00
pollfd.c api rationalization: eliminate all libwebsocket[s]_ prefixes 2015-12-04 11:08:32 +08:00
private-libwebsockets.h lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
server-handshake.c Access to wsi->ssl at LWS_CALLBACK_ESTABLISHED 2015-12-09 07:27:15 +08:00
server.c lws_plat_fd implement platform default handlers 2015-12-10 11:01:59 +08:00
service.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
sha-1.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00
ssl-http2.c clean more whitespace 4 2015-12-06 09:15:27 +08:00
ssl.c clean reduce windows build warnings 2015-12-06 08:00:03 +08:00