add small explanation to iob.h

This commit is contained in:
Felix von Leitner 2003-09-08 21:05:27 +00:00
parent 0c06a13442
commit ffc6fb7cf8
3 changed files with 15 additions and 0 deletions

View File

@ -8,6 +8,7 @@
add buffer functions to write strerror(errno)
add io API supporting poll, epoll and kqueue
remove obsolete "extern" from header files
add iob API to send several buffers and files in one batch
man page update (document stralloc return values)

View File

@ -62,6 +62,9 @@ $(ARRAY_OBJS): uint64.h array.h
$(MULT_OBJS): uint64.h uint32.h uint16.h safemult.h
$(IO_OBJS): uint64.h array.h io.h io_internal.h taia.h tai.h haveepoll.h havekqueue.h
iob_addbuf.o iob_addfile.o iob_new.o iob_reset.o iob_send.o: iob_internal.h iob.h
iopause.o: select.h
openreadclose.o readclose.o: readclose.h
dns_rcip.o dns_rcrw.o openreadclose.o: openreadclose.h

View File

@ -1,6 +1,17 @@
#ifndef _IOB_H
#define _IOB_H
/* These functions can be used to create a queue of small (or large)
* buffers and parts of files to be sent out over a socket. It is meant
* for writing HTTP servers or the like. */
/* This API works with non-blocking I/O. Simply call iob_send until it
* returns 0 (or -1). The implementation uses sendfile for zero-copy
* TCP and it will employ writev (or the built-in sendfile writev on
* BSD) to make sure the output fragments are coalesced into as few TCP
* frames as possible. On Linux it will also use the TCP_CORK socket
* option. */
#include "io.h"
typedef struct io_batch io_batch;