httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Szymaniak <>
Subject Re: support for multiple tcp/udp ports
Date Thu, 29 Nov 2001 20:12:49 GMT

Hello again.

> It is now possible to write a module that will make Apache listen on
> UDP ports.  However, as somebody who has done this in the past,
> it's not a good idea.  You lose too much data on every request.

Could you explain what you mean by saying 'you lose data'? Is it losing
data because of lack of reliability in udp, or missing datagrams that
arrive to your udp socket and are subsequently overwritten by next ones
before you manage to service them?

Anyway, I have tried to modify the echo module to manage additonal
sockets: I added post_config hook that created new sockets together
with associated apr_listen_rec structures and then simply inserted them
into the 'ap_listeners' list. As long as the sockets were tcp-oriented,
everything was just fine. However, after switching from SOCK_STREAM to
SOCK_DGRAM, apache exited with a critical error, leaving (in 'error_log')
a few lines about 'invalid operations on non-tcp socket'.

I looked into apache source and it is clearly visible that all(?) the
routines assume the sockets from the 'ap_listeners' list to be tcp ones.
So how can I handle incoming udp datagrams _without_ modifying apache
source? BTW, the aim is not to run http over udp, but simply to support
certain stupid protocol using udp - and it will be good enough if my
module reacts for every incoming udp datagram with sending an appropriate
response in another udp datagram.

If it makes any difference - I play with apache 2.0.28.

Kind regards,
+------------------------ ---- -- -- -  -     -   
: Michal Szymaniak |

View raw message