if (wsi->trunc_len)
return 1;
- fds.fd = wsi->sock;
+ fds.fd = wsi->desc.sockfd;
fds.events = POLLOUT;
fds.revents = 0;
return "lws_plat_inet_ntop";
}
-static lws_filefd_type
-_lws_plat_file_open(struct lws *wsi, const char *filename,
- unsigned long *filelen, int flags)
+LWS_VISIBLE int
+lws_plat_inet_pton(int af, const char *src, void *dst)
{
- return 0;
+ //return inet_pton(af, src, dst);
+ return 1;
}
-static int
-_lws_plat_file_close(struct lws *wsi, lws_filefd_type fd)
+LWS_VISIBLE lws_fop_fd_t
+_lws_plat_file_open(lws_plat_file_open(struct lws_plat_file_ops *fops,
+ const char *filename, lws_fop_flags_t *flags)
+{
+ return NULL;
+}
+
+LWS_VISIBLE int
+_lws_plat_file_close(lws_fop_fd_t *fop_fd)
{
return 0;
}
-unsigned long
-_lws_plat_file_seek_cur(struct lws *wsi, lws_filefd_type fd, long offset)
+LWS_VISIBLE lws_fileofs_t
+_lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset)
{
return 0;
}
-static int
-_lws_plat_file_read(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
- unsigned char *buf, unsigned long len)
+LWS_VISIBLE int
+_lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
{
return 0;
}
-static int
-_lws_plat_file_write(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
- unsigned char *buf, unsigned long len)
+LWS_VISIBLE int
+_lws_plat_file_write(lws_fop_fd_t fop_fd, lws_filepos_t *amount,
+ uint8_t *buf, lws_filepos_t len)
{
return 0;
return 1;
}
- lwsl_notice(" mem: platform fd map: %5u bytes\n",
- sizeof(struct lws *) * context->max_fds);
-
- context->fops.open = _lws_plat_file_open;
- context->fops.close = _lws_plat_file_close;
- context->fops.seek_cur = _lws_plat_file_seek_cur;
- context->fops.read = _lws_plat_file_read;
- context->fops.write = _lws_plat_file_write;
+ lwsl_notice(" mem: platform fd map: %5lu bytes\n",
+ (long)sizeof(struct lws *) * context->max_fds);
#ifdef LWS_WITH_PLUGINS
if (info->plugin_dirs)