httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Szymaniak <mszy...@mimuw.edu.pl>
Subject [2bugs] socket types and socket private data
Date Tue, 19 Mar 2002 15:18:42 GMT

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:mszyman@mimuw.edu.pl
.


Mime
View raw message