Buckets

Data Structures

struct ymo_bucket

Internal data structure used to buffer writes.

Definition
struct ymo_bucket {
    const char*         data;       /* Pointer to the payload data. */
    size_t              len;        /* Payload length */
    char*               buf;        /* Optional pointer to managed memory */
    size_t              buf_len;    /* Length of the managed memory */
    size_t              bytes_sent; /* Total number of bytes sent */
#if YMO_BUCKET_FROM_FILE == YMO_BUCKET_SENDFILE
    int                 fd;         /* TODO: HAVE_DECL_SENDFILE? */
#endif /* YMO_BUCKET_SENDFILE */
    ymo_bucket_t*       next;       /* Next bucket in the chain */
    ymo_bucket_free_fn  cleanup_cb; /* Cleanup callback */
};