Hi,

Although you never respond to my questions, I continue my adventure
with Apache ;-)

This time I would like to inform you about two weird things in
httpd-2.0.32. First: in apr there are functions apr_socket_data_set/get.
This name can be misleading, as they do not associate the data with
the socket, but with the pool where the socket resides. If I create
two sockets in the process pool (because they should survive restarts),
they will share the same data. Therefore, these functions cannot be used
to implement any socket-private user data, or to distinguish between sockets.

And the distinguishing is another thing: at the moment it is not possible
to distiguish between TCP and UDP socket using the same local address and
port. In particular, routine reusing sockets in server/listen.c can reuse
UDP socket from local port 80 and try to use it as a main http socket.
Funny thing - probably on each architecture-version of the apr_socket_t
structure there is a 'type' field. However, it inaccessible for a module
without including the architecture-dependent networkio.h header (which is
bad by nature). A simple apr_socket_type function would do..

Regards,
M.
--
+------------------------ ---- -- -- -  -     -   
: Michal Szymaniak | mailto:[EMAIL PROTECTED]
.

Reply via email to