![]() |
libwebsockets
Lightweight C library for HTML5 websockets
|
Data Fields | |
lws_filefd_type(* | LWS_FOP_OPEN )(struct lws *wsi, const char *filename, unsigned long *filelen, int *flags) |
int(* | LWS_FOP_CLOSE )(struct lws *wsi, lws_filefd_type fd) |
unsigned long(* | LWS_FOP_SEEK_CUR )(struct lws *wsi, lws_filefd_type fd, long offset_from_cur_pos) |
int(* | LWS_FOP_READ )(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
int(* | LWS_FOP_WRITE )(struct lws *wsi, lws_filefd_type fd, unsigned long *amount, unsigned char *buf, unsigned long len) |
int(* lws_plat_file_ops::LWS_FOP_CLOSE) (struct lws *wsi, lws_filefd_type fd) |
close file
lws_filefd_type(* lws_plat_file_ops::LWS_FOP_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 & LWS_FOP_FLAGS_MASK should be set to O_RDONLY or O_RDWR. If the file may be gzip-compressed, LWS_FOP_FLAG_COMPR_ACCEPTABLE_GZIP is set. If it actually is gzip-compressed, then the open handler should OR LWS_FOP_FLAG_COMPR_IS_GZIP on to *flags before returning.
int(* lws_plat_file_ops::LWS_FOP_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::LWS_FOP_SEEK_CUR) (struct lws *wsi, lws_filefd_type fd, long offset_from_cur_pos) |
seek from current position
int(* lws_plat_file_ops::LWS_FOP_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