httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Issac Goldstand <>
Subject Re: Revisiting UDP support (for trunk)
Date Sun, 02 Sep 2007 13:11:48 GMT
As I hit send on that last email, it occurred to me that another, 
possibly more elegant, solution would be to patch the core_input and 
core_output filters to use recvfrom and sendto if a non-stream socket is 
detected.  In that case, I think the what needs to be done is to  modify 
the core create_connection to detect a non-stream socket and not set up 
remote information.  Then core_input would need to update the peer 
information in the conn_rec, and use recvfrom, while core_output would 
use sendto (with the saved peer information).  It's probably tricky, but 
appeals to me more than letting children muck with the listeners...


Issac Goldstand wrote:
> Hi all,
>  I've been quietly hacking away at getting UDP support working with 
> trunk (prefork/unix only, for starters).  While I had a decent amount 
> of success, I eventually got stuck: my original naive  plan had been 
> to poll, recvfrom (to get peer address), dup the socket, connect the 
> dup-ed socket and close the dup-ed socket after processing a single 
> request (as defined by the connection/protocol handlers).  The hope 
> was that since we never connected the original socket, it would still 
> do something useful.  To make a long story short, I found that it 
> wasn't doing anything of the sort.
> Before I launch into a new tactic, I wanted to see if someone has a 
> better idea than me - the only thing that pops into my mind is moving 
> some sort of pointers to the UDP listeners into the scoreboard (or 
> some other R/W shared area) and simply letting the children/workers 
> lock used sockets (so other children/workers don't poll it), and 
> completely replace them after they're used.  There are a lot of 
> disadvantages to doing that, I think, but I can't dream up a smarter 
> solution.  Anyone have any ideas?
>  Issac

View raw message