![]() |
libwebsockets
Lightweight C library for HTML5 websockets
|
#include <libwebsockets.h>
Data Fields | |
lws_filefd_type(* | open )(struct lws *wsi, const char *filename, unsigned long *filelen, int flags) |
int(* | close )(struct lws *wsi, lws_filefd_type fd) |
unsigned long(* | seek_cur )(struct lws *wsi, lws_filefd_type fd, long offset_from_cur_pos) |
int(* | read )(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
int(* | write )(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
struct lws_plat_file_ops - Platform-specific file operations
These provide platform-agnostic ways to deal with filesystem access in the library and in the user code.
int(* lws_plat_file_ops::close) (struct lws *wsi, lws_filefd_type fd) |
close file
lws_filefd_type(* lws_plat_file_ops::open) (struct lws *wsi, const char *filename, unsigned long *filelen, int flags) |
Open file (always binary access if plat supports it) filelen is filled on exit to be the length of the file flags should be set to O_RDONLY or O_RDWR
int(* lws_plat_file_ops::read) (struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
Read from file, on exit *amount is set to amount actually read
unsigned long(* lws_plat_file_ops::seek_cur) (struct lws *wsi, lws_filefd_type fd, long offset_from_cur_pos) |
seek from current position
int(* lws_plat_file_ops::write) (struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
Write to file, on exit *amount is set to amount actually written