io_object

March 26, 2020 Contributors

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

ec_spool_ctx_filter_open, io_wrapper_openand “io_wrapper”