httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject Inconsistent file and network I/O APIs
Date Wed, 16 Feb 2000 20:06:22 GMT
ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, ap_int32_t
nvec, ap_int32_t *nbytes); /* socket API */

ap_status_t ap_writev(ap_file_t *, const ap_iovec_t *, ap_ssize_t *); /*
File API */

Notice that ap_sendv() passes a struct iovec*, but ap_writev() passes an

ap_iovec_t is defined thusly:

    struct iovec_t {
        ap_context_t *cntxt;
        struct iovec *theiov;

Why do we need to extend struct iovec (a POSIX structure) by wrappering it
in ap_iovec_t? Why do we need the context in the ap_iovec_t? AFAIK, we only
use this APR definition once, in mod_rewrite where we call ap_make_iovec()
to convert a struct iovec to an ap_iovec_t before calling ap_sendv().

I just don't get the point of this. The POSIX definition is sufficient, why
do we need to complicate things?

BTW, file i/o through the IOL is broken now because of this. I'll fix it and
my preference is to eliminate usage of ap_iovec_t in the file i/o routines.

Bill Stoddard

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

View raw message