Hi,

I've seen mention both recently and in 11/1999 on this list
regarding Apache 2.0 and support for UDP.

I too am interested in UDP support within Apache 2.0.  Ideally, I'd like a
server that supported both UDP and TCP simultaneously, but if UDP support
were a configurable option (either UDP or TCP), that would be okay.

I've looked through the code, and from what I can figure
out, it looks like the you would have to alter the following
code (assuming worker mpm on Linux):

1.      in alloc_listener (server/listen.c), there needs to be
        support added for SOCK_DGRAM in the call to apr_socket_create.

2.      in make_sock (server/listen.c), for UDP sockets, you'd
        have to skip doing the apr_listen() call.

3.      you've have to compile Apache with TCP_NODELAY undef'ed.

4.      in server/core.c, there needs to be a parallel UDP'ized
        writev_it_all() that does apr_sendto's instead of apr_sendv.
        There would also need to be an abstraction above these functions
        that one of these functions depending upon TCP or UDP socket.

5.      instead of going to apr_accept() (in
srclib/apr/network_io/unix/sockets.c)
        from within server/mpm/worker.c, you'd have to go to a UDP version
        that just does a recvfrom(), instead of an accept.

This seems like touching code in a lot of disparate places.
Does anyone have an implementation that supports UDP that's cleaner than
this?
Or can anyone offer any tips/pointers for adding UDP support?

Thanks,

Tony
[EMAIL PROTECTED]


Reply via email to