Subject: windows: support to bind to a specific IPv6 address
[platform/upstream/libwebsockets.git] / lib / lws-plat-optee.c
index ca7e88d..3006a6d 100644 (file)
@@ -29,7 +29,7 @@ lws_send_pipe_choked(struct lws *wsi)
        if (wsi->trunc_len)
                return 1;
 
-       fds.fd = wsi->sock;
+       fds.fd = wsi->desc.sockfd;
        fds.events = POLLOUT;
        fds.revents = 0;
 
@@ -261,36 +261,43 @@ lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
        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;
@@ -313,12 +320,6 @@ lws_plat_init(struct lws_context *context,
        lwsl_notice(" mem: platform fd map: %5lu bytes\n",
                    (long)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;
-
 #ifdef LWS_WITH_PLUGINS
        if (info->plugin_dirs)
                lws_plat_plugins_init(context, info->plugin_dirs);