httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: cvs commit: apache-apr/pthreads/src/main http_protocol.c
Date Mon, 22 Mar 1999 13:22:51 GMT
> This may be how you did it... I haven't looked.  timed read/write should
> be as "easy" as:
> 
> - marking all fds non-blocking at creation time
> 
> - do this to read/write:
> 
> 
>   for (;;) {
>     do {
> 	read/write
>     } until finished or get EWOULDBLOCK
>     if (finished) break;
>     select(fd for reading/writing, timeout)
>   }

This is very close to how I did it, but I marked the file descriptor as
nonblocking within (send|recv)withtimeout, and then marked it as blocking
as I left the function.  I did this because I need to run through the Buff
code to make we always check for EWOULDBLOCK before I set all fd's as
NONBLOCKING.  I think there are other places we write to and read from
sockets, but I haven't had the time to check it out yet.

Ryan

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Mime
View raw message