/*
 * ioqueue.h
 *
 * stores and frees data associated with a file descriptor.
 * uses writev to write, and read to read.
 *
 */

#ifndef _IOQUEUE_H_
#define _IOQUEUE_H_

#define IOQ_BUFSIZE	2048
#define MAXIOV		16

struct io {
	struct qelem queue;
	int size;
	int nbytes;
	int offset;
	s_char *data;
};

struct ioqueue {
	struct io list;
	int bufsize;
	int cc;
};

struct ioqueue *ioq_create();

#endif /* _IOQUEUE_H_ */
