Skip to main content

This struct is defined as follows:

struct _io_mem {
  char *buf;
  size_t len;
  int memtype;
  ec_atomic_t ref;

struct _io_object {
  io_wrapper *methods;
  ec_atomic_t ref;
  char *scheme;
  char *path;
  int mode;
  int options;
  union {
    int fd;
    void *handle;
    struct {
      struct _io_mem *memory;
      off_t pos;
      int fd_for_sendfile;
    } mem;
  } io;
  void (*on_destroy)(io_object *io);
  /* app_closure is for application usage; it is invalid
   * for an io_wrapper to touch app_closure */
  void *app_closure;
  string *readbuf;
  int readbufpos;
  ECDict context;

To use this struct, include the file io_wrapper_int.h.

See Also

Was this page helpful?