summaryrefslogtreecommitdiff
path: root/include/apr_network_io.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespaces.Ivan Zhakov2022-11-191-65/+65
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905407 13f79535-47bb-0310-9956-ffa450edef68
* Revert r1902312, r1904699 in preparation for a slightly different change.Evgeny Kotkov2022-10-201-6/+0
| | | | | | | | | | | | Shortlog: - r1902312: apr_socket_sendv: WIN32: Limit the number of WSABUFs allocated for a single call. - r1904699: apr_socket_sendv: WIN32: Follow up to r1902312: Avoid short writes. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1904714 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_sendv: WIN32: Follow up to r1902312: Avoid short writes.Yann Ylavic2022-10-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We possibly (edge cases) can't send an entire iovec array in a single WSASend() call because structs WSABUF and iovec are ABI incompatible. To avoid breaking users that rely on full-write by apr_socket_sendv(), which supposedly is guaranteed by WSASend(), repeat the call until the given iovec array is exhausted. There is no way to provide both full-write and atomicity guarantees for apr_socket_sendv() on Windows, so we choose the former.. * include/apr_network_io.h: Document apr_socket_sendv() full-write/atomicity (non-)guarantees above the system ones. * network_io/win32/sendrecv.c(apr_socket_sendv): Change to a loop on WSASend() when needed, taking care of its API limits w.r.t. the given struct iovec. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1904699 13f79535-47bb-0310-9956-ffa450edef68
* Replace tabs to spaces.Ivan Zhakov2022-07-081-10/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902583 13f79535-47bb-0310-9956-ffa450edef68
* Remove the APR_SENDFILE_DISCONNECT_SOCKET flag.Ivan Zhakov2019-09-201-6/+1
| | | | | | | | | | | | | | | | | | There are several problems with this flag: 1. The TCP socket may be subject to the TCP TIME_WAIT state. That means apr_sock_sendfile() could occupy worker thread for significant time (30 seconds) 2. With this flag specified, the socket descriptor is removed from the apr_socket_t and the caller caller is expected to maintain the descriptor and release it manually, which is particularly error-prone. See also: https://lists.apache.org/thread.html/a3c4a03961a4b5842e7f657a15fe777edf5949b768a2807619a104b1@%3Cdev.apr.apache.org%3E git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1867226 13f79535-47bb-0310-9956-ffa450edef68
* Fix some missing doxygen documentation (even if ready to use!)Christophe Jaillet2019-05-041-2/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1858596 13f79535-47bb-0310-9956-ffa450edef68
* * network_io/unix/sockaddr.c (apr_sockaddr_zone_set): FailJoe Orton2017-11-291-0/+2
| | | | | | | | | | | for an address which is not link-local. * include/apr_network_io.h: Document the above. * test/testsock.c (test_zone): Test for that. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1816628 13f79535-47bb-0310-9956-ffa450edef68
* Support IPv6 link-local address scope/zone mapping.Joe Orton2017-11-281-0/+23
| | | | | | | | | | | | | | | | | | | | * network_io/unix/sockaddr.c (apr_sockaddr_zone_set, apr_sockaddr_zone_get): New functions. (apr_sockaddr_ip_getbuf): Append %scope for link-local address. (apr_sockaddr_equal): Compare link-local address with different scopes as not equal. * include/apr_network_io.h: Add function declarations. * configure.in: Test for if_indextoname and if_nametoindex. * test/testsock.c (test_zone): New test case. * include/arch/win32/apr_private.h: Assume Windows supports if_nametoindex and if_indextoname. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1816527 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_sendfile:Yann Ylavic2017-03-281-0/+1
| | | | | | | | | | | | | | Be accurate (and consistent accross unixes) with the returned number of bytes written (note that it is possible for both bytes to be sent and an error to be returned, due to headers and trailers handling). Fix some returned errno vs apr_status_t in some error paths. Fix BSDs nonblocking/busy retry on EAGAIN when nothing is written. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1789257 13f79535-47bb-0310-9956-ffa450edef68
* Committed to 1.6.x branch first in error in r1733456:Joe Orton2016-03-031-0/+1
| | | | | | | * include/apr_network_io.h: Document APR_SO_FREEBIND here. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1733457 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h (APR_SO_FREEBIND): Add option.Joe Orton2016-03-031-0/+3
| | | | | | | | | | | | * network_io/unix/sockopt.c (apr_socket_opt_set): Implement APR_SO_FREEBIND on Linux with IP_FREEBIND * test/testsock.c (test_freebind): Add test case. Submitted by: Ashley GC, jkaluza, jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1733451 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_sockaddr_info_copy(), for making a deep copy of anJeff Trawick2014-04-131-0/+9
| | | | | | | | | | apr_sockaddr_t into a specified pool. Submitted by: Yann Ylavic <ylavic.dev gmail.com> Reviewed by: trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1587045 13f79535-47bb-0310-9956-ffa450edef68
* mention non-portability of an odd apr_getnameinfo() useJeff Trawick2013-12-061-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1548575 13f79535-47bb-0310-9956-ffa450edef68
* add apr_sockaddr_is_wildcard() APIJeff Trawick2013-11-121-0/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1541061 13f79535-47bb-0310-9956-ffa450edef68
* minor corrections to apr_socket_sendv() documentationJeff Trawick2013-08-041-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1510354 13f79535-47bb-0310-9956-ffa450edef68
* add a warning about thread safetyStefan Fritsch2013-03-231-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1460241 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_accept_filter(): The 2nd and 3rd arguments are now Jeff Trawick2012-11-031-2/+2
| | | | | | | const char * instead of char *. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1405402 13f79535-47bb-0310-9956-ffa450edef68
* Add support for APR_SO_BROADCASTStefan Fritsch2011-10-151-0/+2
| | | | | | | | PR: 46389 Submitted by: Armin Müller <mueller itestra com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1183693 13f79535-47bb-0310-9956-ffa450edef68
* fix extra "the" in comments and license textJeff Trawick2011-03-231-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1084662 13f79535-47bb-0310-9956-ffa450edef68
* Hide apr_wait_for_io_or_timeout() from public view and add insteadBrian Havard2010-04-121-0/+10
| | | | | | | apr_socket_wait() and apr_file_pipe_wait(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@933338 13f79535-47bb-0310-9956-ffa450edef68
* Fixes various doxygen usage warnings and minor doxygen errors.Graham Leggett2010-01-061-4/+5
| | | | | | | Submitted by: Neil Conway <nrc@cs.berkeley.edu> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@896382 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h,Joe Orton2009-10-121-9/+11
| | | | | | | | | | | | | | * network_io/unix/socket_util.c (apr_socket_atreadeof): Renamed from apr_socket_is_connected; adjusted to return an apr_status_t error code, and pass an "at EOF" flag via an output parameter. * test/testsock.c (test_atreadeof): Renamed from test_is_connected, adjusted for new API. Submitted by: jorton, rpluem git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@824500 13f79535-47bb-0310-9956-ffa450edef68
* * Improve the documentation even furtherRuediger Pluem2009-10-071-3/+3
| | | | | | | Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@822892 13f79535-47bb-0310-9956-ffa450edef68
* * Improve the documentationRuediger Pluem2009-10-061-1/+8
| | | | | | | Suggested by: jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@822431 13f79535-47bb-0310-9956-ffa450edef68
* * Add apr_socket_is_connected to detect whether the remote side of a socketRuediger Pluem2009-10-041-0/+6
| | | | | | | | | is still open. The origin of apr_socket_is_connected is r473278 from http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c in httpd. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@821524 13f79535-47bb-0310-9956-ffa450edef68
* Fix copy/paste typoMladen Turk2009-02-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@745764 13f79535-47bb-0310-9956-ffa450edef68
* Enable unix domain (AF_UNIX) sockets if supported by the OSMladen Turk2009-02-191-0/+34
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@745763 13f79535-47bb-0310-9956-ffa450edef68
* Revert sockaddr.c all the way back to r428317, and discardWilliam A. Rowe Jr2007-12-151-4/+0
| | | | | | | | | the IPv4 address resolution for APR_INET6 sockaddr resolution, per Joe's objection and no other interest. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@604389 13f79535-47bb-0310-9956-ffa450edef68
* Propose an API and it's explicit meaning.William A. Rowe Jr2007-12-121-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@603434 13f79535-47bb-0310-9956-ffa450edef68
* Add some documentationDavid Reid2007-02-171-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@508781 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h: Avoid inappropriate use of the wordJoe Orton2006-11-291-3/+6
| | | | | | | "interface". git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@480497 13f79535-47bb-0310-9956-ffa450edef68
* Fixes for the implementation, documentation and test case forJoe Orton2006-10-251-1/+5
| | | | | | | | | | | | | | | | | apr_socket_recvfrom(); * network_io/unix/sendrecv.c (apr_socket_recvfrom): Reset the socklen argument correctly before calling recvfrom. On success, update all the sockaddr variables for the address returned, not just the port. * include/apr_network_io.h (apr_socket_recvfrom): Document a little better. * test/testsockets.c (sendto_receivefrom): Check that the address is set correctly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@467600 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-031-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* - remove what appears to be a copy/paste error from docs inDavid Reid2006-06-221-1/+0
| | | | | | | | | network_io - add details about ranges of status numbers used by apr git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@416407 13f79535-47bb-0310-9956-ffa450edef68
* Documentation ClarificationIan Holsman2006-04-191-1/+1
| | | | | | | Submitted by: Andreas Fester afester _at_ apache.org git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@395439 13f79535-47bb-0310-9956-ffa450edef68
* Fix handling of %pI with psprintf; the psprintf implementation assumesJoe Orton2005-09-081-0/+9
| | | | | | | | | | | | | | | | | | | that the vformatter code will not palloc. * include/apr_network_io.h (apr_sockaddr_ip_getbuf): Declare new function. * network_io/unix/sockaddr.c (apr_sockaddr_ip_getbuf): Rewrite of apr_sockaddr_ip_get, taking a buffer argument. (apr_sockaddr_ip_get): Reimplement using apr_sockaddr_ip_getbuf. * strings/apr_snprintf.c (conv_apr_sockaddr): Use apr_sockaddr_ip_getbuf to avoid use of pool. * test/testsock.c (test_print_addr): New test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@279566 13f79535-47bb-0310-9956-ffa450edef68
* Implement pool accessor for socketsMladen Turk2005-06-121-0/+5
| | | | | | | | There is no functional change except changing stuct mamber from cntxt to pool to be able to use the ACCESSOR macros. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@190305 13f79535-47bb-0310-9956-ffa450edef68
* * network_io/unix/multicast.c (apr_mcast_leave): Rename 'leave'Joe Orton2005-02-151-2/+2
| | | | | | | | argument to 'addr' to fix Tru64 5.0 build, where "leave" is #defined to some weird builtin. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@153917 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Add Support for Single Source Multicast.Paul Querna2005-01-101-8/+6
| | | | | | | Submitted By: Colm MacCarthaigh git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@124752 13f79535-47bb-0310-9956-ffa450edef68
* Add arguments for Single Source Multicast Support as suggested by Colm Paul Querna2005-01-031-2/+10
| | | | | | | | | | MacCarthaigh on dev@apr. SSM Support is not implemented, but I added it in the interest of making a single API that can be used in the future. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@123950 13f79535-47bb-0310-9956-ffa450edef68
* Adding an initial Multicast API.Paul Querna2005-01-021-0/+57
| | | | | | | | | | Tested On: OS X, FreeBSD, NetBSD and Linux. Needs more Platform Specific Code: Netware, Windows git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@123883 13f79535-47bb-0310-9956-ffa450edef68
* Add support for Linux's TCP_DEFER_ACCEPT. Sort of like FreeBSD's accept ↵Paul Querna2004-12-111-0/+4
| | | | | | filters, except defer accept isn't documented, anywhere. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@111595 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h (apr_socket_sendfile): DocumentJoe Orton2004-12-011-1/+3
| | | | | | | | | | that the offset parameter is pass-by-reference for no reason. * include/apr_lib.h (apr_password_get): Likewise for the bufsize parameter. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@109329 13f79535-47bb-0310-9956-ffa450edef68
* add some hints about non-blocking socketsJeff Trawick2004-09-301-5/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65358 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-131-49/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* silence 2 doxygen warningsIan Holsman2003-12-291-0/+4
| | | | | | | submitted by: sander temme <sander at temmet dot net> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64849 13f79535-47bb-0310-9956-ffa450edef68
* axe apr_sockaddr_port_set() and apr_sockaddr_port_get() from APRJeff Trawick2003-12-051-16/+0
| | | | | | | 1.0 API git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64811 13f79535-47bb-0310-9956-ffa450edef68
* remove apr_sockaddr_ip_set() APIJeff Trawick2003-12-031-12/+1
| | | | | | | | remove comment in apr_socket_connect() documentation mentioning that the sockaddr parameter can be NULL git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64806 13f79535-47bb-0310-9956-ffa450edef68