diff options
author | des <des@FreeBSD.org> | 2002-10-27 16:11:21 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-10-27 16:11:21 +0000 |
commit | 34e6c489c762ffd7ea3491b3cf85302c64a36b97 (patch) | |
tree | eec6756c8581909e18114c1772d9c8ca0d67bbe0 /lib/libfetch/common.h | |
parent | e6f3037210bd2a8b2debfe2237120ff0c87b2566 (diff) | |
download | FreeBSD-src-34e6c489c762ffd7ea3491b3cf85302c64a36b97.zip FreeBSD-src-34e6c489c762ffd7ea3491b3cf85302c64a36b97.tar.gz |
Introduce _fetch_writev(), which is the conn_t version of writev(2). In
the SSL case, it is no different from the old _fetch_write(), but in the
non-SSL case it uses writev(2) to send the entire vector as a single
packet (provided it can fit in one packet). Implement _fetch_write()
and _fetch_putln() in terms of _fetch_writev().
This should improve performance in the non-SSL case (by reducing protocol
overhead) and solve the problem where too-smart-for-their-own-good
firewalls reject FTP packets that do not end in CRLF.
PR: bin/44123
Submitted by: fenner
Diffstat (limited to 'lib/libfetch/common.h')
-rw-r--r-- | lib/libfetch/common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h index 42f68a8..4b42bf2 100644 --- a/lib/libfetch/common.h +++ b/lib/libfetch/common.h @@ -68,6 +68,9 @@ struct fetcherr { const char *string; }; +/* for _fetch_writev */ +struct iovec; + void _fetch_seterr(struct fetcherr *, int); void _fetch_syserr(void); void _fetch_info(const char *, ...); @@ -80,6 +83,7 @@ int _fetch_ssl(conn_t *, int); ssize_t _fetch_read(conn_t *, char *, size_t); int _fetch_getln(conn_t *); ssize_t _fetch_write(conn_t *, const char *, size_t); +ssize_t _fetch_writev(conn_t *, struct iovec *, int); int _fetch_putln(conn_t *, const char *, size_t); int _fetch_close(conn_t *); int _fetch_add_entry(struct url_ent **, int *, int *, |