mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
![]() 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> |
||
---|---|---|
.. | ||
.gitignore | ||
alloc.c | ||
base64-decode.c | ||
client-handshake.c | ||
client-parser.c | ||
client.c | ||
context.c | ||
daemonize.c | ||
extension-deflate-frame.c | ||
extension-deflate-frame.h | ||
extension-deflate-stream.c | ||
extension-deflate-stream.h | ||
extension.c | ||
getifaddrs.c | ||
getifaddrs.h | ||
handshake.c | ||
header.c | ||
hpack.c | ||
http2.c | ||
huftable.h | ||
lextable-strings.h | ||
lextable.h | ||
libev.c | ||
libwebsockets.c | ||
libwebsockets.h | ||
lws-plat-mbed3.c | ||
lws-plat-mbed3.cpp | ||
lws-plat-unix.c | ||
lws-plat-win.c | ||
minihuf.c | ||
minilex.c | ||
output.c | ||
parsers.c | ||
pollfd.c | ||
private-libwebsockets.h | ||
server-handshake.c | ||
server.c | ||
service.c | ||
sha-1.c | ||
ssl-http2.c | ||
ssl.c |