summaryrefslogtreecommitdiff
path: root/network_io
Commit message (Collapse)AuthorAgeFilesLines
* Knock off some XXX's prior to a7.wrowe2000-10-061-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60556 13f79535-47bb-0310-9956-ffa450edef68
* Here it is, the Win32 part of the big canonical errors patch.wrowe2000-10-065-28/+28
| | | | | | | | | | | | | | | | | | The reason is really, really simple. If we ever choose to mix clib and dos error codes, they criss-cross and don't line up, but they share the same number space. As I wrote the new APR_IS_ERROR macros, I realized we were about to shoot ourselves in the foot. These changes nearly entirely affect Win32 only. The next big patch will affect all of the rv == APR_ENOENT type problems throughout the system. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60553 13f79535-47bb-0310-9956-ffa450edef68
* Some systems have poll.h in include/sys, not include. I found thisrbb2000-09-291-0/+3
| | | | | | | problem on non-glibc linux machines. This patch solves the problem. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60540 13f79535-47bb-0310-9956-ffa450edef68
* Provide a socklen_t to the user of APR as a portability aid. Sometrawick2000-09-223-3/+3
| | | | | | | | | | | | | | | | | | systems have unsigned sockaddr len parameters; others have signed. When passing the length by address (as to accept()) a warning is generated if the sign is not correct. This patch assumes that, if no native socklen_t is provided, apr_socklen_t is always signed; that can be easily tweaked for certain platforms later. Inside APR, apr_socklen_t is only used currently in the Unix implementation. Submitted by: Victor J. Orlikowski <v.j.orlikowski@gte.net> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60538 13f79535-47bb-0310-9956-ffa450edef68
* Add some .cvsignore goodness...dreid2000-09-161-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60534 13f79535-47bb-0310-9956-ffa450edef68
* Add apr-sendv using the "I don't have writev" workaround.dreid2000-08-291-0/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60514 13f79535-47bb-0310-9956-ffa450edef68
* Adjust the TCP_NODELAY code for the older BeOS stack...dreid2000-08-261-3/+11
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60513 13f79535-47bb-0310-9956-ffa450edef68
* Don't fail to compile unix/sockopt.c if TCP_NODELAY isn't defined.trawick2000-08-221-0/+4
| | | | | | | | | | Define TCP_NODELAY on OS/390. libc doesn't define it in a header file we'd want to include. TCP_NODELAY was busted all along on OS/390; we just didn't realize it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60509 13f79535-47bb-0310-9956-ffa450edef68
* APRize disabling nagle (setting TCP_NODELAY).bjh2000-08-224-1/+21
| | | | | | | | | | | | | Note that several areas have not been tested as they apply to MPMs or APR code that I can't test. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60508 13f79535-47bb-0310-9956-ffa450edef68
* Win32: After much experimentation, I've decided to continue to usestoddard2000-08-181-91/+142
| | | | | | | | | | | | | | | | | | | setsockopt(SO_SNDRCVTIMEO). Applications will need to segment apr_sends or set timeouts appropriately to accomodate slow clients. Apache should be fine as it does not typically attempt to apr_send more than 8192 bytes at once with default timeouts of 15 seconds. apr_sendfile() is another matter... On Windows, TransmitFile will block (or not trigger a completion event) until the entire file content is sent. It is easy for a slow client to request a file than cannot be served before the timeout expires. To accomodate these cases, I introduced the MAX_SEGMENT_SIZE #define to define the maximum amount of data TransmitFile will be asked to send at once. The default setting of 65536 should accomodate most clients dialed in at 28K (or more) if i/o timeouts are configured to be 30 seconds or more. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60506 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Simplify the code a bit by eliminating a variable.stoddard2000-08-171-15/+11
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60502 13f79535-47bb-0310-9956-ffa450edef68
* Include apr_strings.h in a bunch more places that need it.bjh2000-08-061-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60486 13f79535-47bb-0310-9956-ffa450edef68
* Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...wrowe2000-08-0610-15/+15
| | | | | | | | | | | | | see src/lib/apr/apr_compat.h for most details. Also a few minor nits to get Win32 to build. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60481 13f79535-47bb-0310-9956-ffa450edef68
* Fix Win32 compile break caused by ap_ to apr_ migration. Change ap_sendfile tostoddard2000-08-042-11/+11
| | | | | | | apr_sendfile. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60474 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Fix problem with timeout units on TransmitFile.stoddard2000-08-042-7/+9
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60473 13f79535-47bb-0310-9956-ffa450edef68
* prefix libapr functions and types with apr_dougm2000-08-0223-388/+388
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
* Fix problems with APR sockaddr handling on Win32. It didn't alwaystrawick2000-08-013-12/+83
| | | | | | | | | | | return the right information on the local socket address. This change uses the Unix logic for delaying/avoiding getsockname() to ensure that it is done when needed. Submitted by: Gregory Nicholls <gnicholls@level8.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60468 13f79535-47bb-0310-9956-ffa450edef68
* ap_recv() on Win32: Set bytes-read to 0 on error.trawick2000-08-011-0/+1
| | | | | | | | Submitted by: Gregory Nicholls <gnicholls@level8.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60467 13f79535-47bb-0310-9956-ffa450edef68
* win32 ap_connect(): check for hostname; it is valid not totrawick2000-07-251-10/+12
| | | | | | | | | pass one, so don't fall over if hostname is NULL. The caller should have called ap_set_remote_ipaddr() if hostname is NULL. Submitted by: Gregory Nicholls <gnicholls@level8.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60451 13f79535-47bb-0310-9956-ffa450edef68
* Changes to get Win32 compiling again, including substitutingwrowe2000-07-252-2/+2
| | | | | | | | | | | | | | apr_string.h for apr_lib.h, fix some bad linkage declarations, and some more comments on threadproc/win32/proc.c PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60444 13f79535-47bb-0310-9956-ffa450edef68
* Update dependenciessascha2000-07-231-2/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60426 13f79535-47bb-0310-9956-ffa450edef68
* Move all APR functions related to strings to their own directory, andrbb2000-07-212-0/+2
| | | | | | | | | create a new header for those functions. This is the first step to removing the apr/lib directory completely, and moving those files/functions to descriptive directories. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60398 13f79535-47bb-0310-9956-ffa450edef68
* ap_sendfile() fix: If the caller passes NULL for the ap_hdtr_t *,trawick2000-07-181-0/+22
| | | | | | | | | set hdtr to the address of one that specifies no headers and trailers. This prevents accessing low core while keeping the following code simpler (no need to check hdtr != NULL later). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60390 13f79535-47bb-0310-9956-ffa450edef68
* Update the Tru64 flavor of ap_sendfile() with latesttrawick2000-07-181-110/+83
| | | | | | | | | version from Dave Hill. It supports non-blocking sockets. Submitted by: Dave Hill <ddhill@zk3.dec.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60387 13f79535-47bb-0310-9956-ffa450edef68
* If TCP_NODELAY is set, ap_sendfile fails on Linux w/EINVAL.trawick2000-07-181-18/+75
| | | | | | | | | | | | | | The setsockopt() for TCP_CORK gets the failure. Submitted by: Greg Ames Reviewed by: Jeff Trawick, who tweaked Greg's latest patch to avoid a compile warning and to work with non-blocking sockets. We can't leave the socket corked when we bail out when a write would block. Not even shutdown will uncork it (Linux kernel 2.2.5). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60385 13f79535-47bb-0310-9956-ffa450edef68
* Add ap_sendfile for Tru64 Unix. This needs to be tested better, but itrbb2000-07-151-1/+143
| | | | | | | | | | is a start. Also, add an error message for machines where sendfile is detected, but nobody has written ap_sendfile. Submitted by: Dave Hill <ddhill@laurel.zk3.dec.com> Reviewed by: Ryan Bloom git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60380 13f79535-47bb-0310-9956-ffa450edef68
* a while back, we said "segfault on invalid params rather than returning angstein2000-07-085-78/+12
| | | | | | | | | | error." this removes some of the error checking that was occurring in the "user data" functions. also saw some in the "get/set OS type" functions and nuked those; there are still checks for pool==NULL, though, since that would end up making us malloc() rather than segfault'ing. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60318 13f79535-47bb-0310-9956-ffa450edef68
* const-ify the userdata interfacesgstein2000-07-087-14/+15
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60317 13f79535-47bb-0310-9956-ffa450edef68
* Update dependancies in APRrbb2000-07-071-26/+29
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60315 13f79535-47bb-0310-9956-ffa450edef68
* ap_sendfile() fixes:trawick2000-07-071-1/+25
| | | | | | | | Linux flavor: get it working with non-blocking sockets which don't have a timeout git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60311 13f79535-47bb-0310-9956-ffa450edef68
* ap_sendfile() fixes:trawick2000-07-071-12/+29
| | | | | | | | | | all Unix flavors: fix the check for whether or not we have a timeout FreeBSD flavor: make it work correct with a non-blocking socket that doesn't have a timeout git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60310 13f79535-47bb-0310-9956-ffa450edef68
* WinNT: Implement acceptex socket reuse. Make sure that the ap_sendfile flagsstoddard2000-07-065-14/+46
| | | | | | | argument is properly initialized for all platforms. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60305 13f79535-47bb-0310-9956-ffa450edef68
* Bring beos back into line following the changes to iol_socket.dreid2000-07-031-1/+13
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60291 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Add ap_getsocketopt() implementation.bjh2000-07-011-0/+14
| | | | | | | | | | PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60289 13f79535-47bb-0310-9956-ffa450edef68
* APR network_io for Unix:trawick2000-06-283-10/+74
| | | | | | | Defer/avoid getsockname() whenever possible. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60280 13f79535-47bb-0310-9956-ffa450edef68
* ap_sendfile() fixes for OS/390 and FreeBSD...trawick2000-06-271-6/+23
| | | | | | | | | | | | | | OS/390: just use Victor's AIX flavor... it works for OS/390 as well FreeBSD: account for header bytes when we tell the kernel how much to send; prior to this fix, we wouldn't send as much of the file as desired if headers were provided Note: APR_SO_TIMEOUT issues discussed on new-httpd today will be addressed later. (one step at a time!) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60269 13f79535-47bb-0310-9956-ffa450edef68
* Change Unix and Win32 ap_setsockopt() so that APR_SO_NONBLOCKtrawick2000-06-272-4/+4
| | | | | | | | with non-zero argument makes the socket non-blocking. BeOS and OS/2 already worked this way. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60266 13f79535-47bb-0310-9956-ffa450edef68
* Can't add anything to a void*. Make it a char* for these manipulations.gstein2000-06-261-2/+2
| | | | | | | | Submitted by: "Victor J. Orlikowski" <vjo@raleigh.ibm.com> Reviewed by: Greg Stein git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60263 13f79535-47bb-0310-9956-ffa450edef68
* Remove const from ap_socket_t parameters on APR functions so thattrawick2000-06-267-18/+18
| | | | | | | | | | | | APR can modify the ap_socket_t as it sees fit. It may choose to modify the ap_socket_t on functions which only read from the ap_socket_t conceptually. Note: http_connection::ap_new_apr_connection() passes its ap_socket_t arg to one of the changed functions, so const was removed there also. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60260 13f79535-47bb-0310-9956-ffa450edef68
* Add a header file.dreid2000-06-261-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60254 13f79535-47bb-0310-9956-ffa450edef68
* More AIX ap_sendfile() clean-up. Use ap_alloc rather than malloc to allocatestoddard2000-06-231-6/+17
| | | | | | | | | | | | | | | | | storage for the headers. This will not cause us too much of a problem in practice for HTTP I think since keep alive connections do not tend to stay up long. OTOH, some benchmarking clients may keep a connection up for the duration of a test run. In this case, need to configure Apache to kill the connection after, say, 100 connections on the outside. Left the malloc code in but #if'ed out in case we want to change it back... Submitted by: Victor Orlikowski (with some munging by Bill) Reviewed by: Bill Stoddard git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60249 13f79535-47bb-0310-9956-ffa450edef68
* I accidentally renamed APR_HAS_SENDFILE to APR_HAVE_SENFILE yesterday. Thisrbb2000-06-222-5/+5
| | | | | | | | | patch changes it back on all platforms. This makes APR_HAS_SENDFILE look like the rest of the APR function feature macros. Sorry about the inadvertant change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60244 13f79535-47bb-0310-9956-ffa450edef68
* Implement retrieval of socket timeouts for Unix so that saferead() cantrawick2000-06-221-0/+12
| | | | | | | | | restore the original timeout on exit. This is very similar to the Win32 implementation Bill Stoddard a week ago. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60242 13f79535-47bb-0310-9956-ffa450edef68
* Big commit. Basically, if APR defines a public feature macro, then APRrbb2000-06-224-10/+11
| | | | | | | | | should also use that macro internally. This keeps us from checking for multiple macros as we were doing in the SENDFILE case. It also means that APR is definately building the same way that external programs expect it to. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60239 13f79535-47bb-0310-9956-ffa450edef68
* Remove warnings on some 64 bit machines because we were return 32 bitrbb2000-06-211-2/+2
| | | | | | | | | integers and we wanted 64 bit integers Submitted by: Victor J. Orlikowski <vjo@raleigh.ibm.com> Reviewed by: Ryan Bloom git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60238 13f79535-47bb-0310-9956-ffa450edef68
* Implement ap_sendfile on AIXstoddard2000-06-191-7/+107
| | | | | | | | Submitted by: Victor Orlikowski Reviewed by: Bill Stoddard git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60229 13f79535-47bb-0310-9956-ffa450edef68
* Continuing the cleanup of beos code.dreid2000-06-171-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60214 13f79535-47bb-0310-9956-ffa450edef68
* Get rid of some unnecessary parameter checking (let it segfault).trawick2000-06-151-20/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60205 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Cleanup ap_setsockopt(). First cut at implementing ap_getsockopt() ↵stoddard2000-06-142-17/+45
| | | | | | | | | and iol_getopt(). Do we need to move iol into APR? git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60204 13f79535-47bb-0310-9956-ffa450edef68
* Get non-blocking network I/O working on Windows. Apache serves pages on Windowsstoddard2000-06-142-12/+42
| | | | | | | now. Cleaned up some Windows specific bugs with timing out connections as well. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60202 13f79535-47bb-0310-9956-ffa450edef68