summaryrefslogtreecommitdiff
path: root/chunk_queue.h
blob: 2bed999cec5ecadc17b791db4a6ae85da78158ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
 *
 * Licensed under the GPL v2. For licencing details see COPYING.
 */

/** \file chunk_queue.h Exported symbols from chunk_queue.c. */

struct chunk_queue;
struct queued_chunk;

int cq_enqueue(struct chunk_queue *cq, const char *buf, size_t num_bytes);
struct queued_chunk *cq_peek(struct chunk_queue *cq);
void cq_dequeue(struct chunk_queue *cq);
void cq_update(struct chunk_queue *cq, size_t sent);
int cq_get(struct queued_chunk *qc, const char **buf, size_t *len);
struct chunk_queue *cq_new(size_t max_pending);
void cq_destroy(struct chunk_queue *cq);