libwebsockets
Lightweight C library for HTML5 websockets
file operation wrapping

Data Structures

struct  lws_plat_file_ops
 

Functions

LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops *LWS_WARN_UNUSED_RESULT lws_get_fops (struct lws_context *context)
 

Detailed Description

File operation wrapping

Use these helper functions if you want to access a file from the perspective of a specific wsi, which is usually the case. If you just want contextless file access, use the fops callbacks directly with NULL wsi instead of these helpers.

If so, then it calls the platform handler or user overrides where present (as defined in info->fops)

The advantage from all this is user code can be portable for file operations without having to deal with differences between platforms.

Function Documentation

◆ lws_get_fops()

LWS_VISIBLE LWS_EXTERN struct lws_plat_file_ops* LWS_WARN_UNUSED_RESULT lws_get_fops ( struct lws_context *  context)

#include <lib/libwebsockets.h>

lws_get_fops() - get current file ops

Parameters
contextcontext