apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <p...@betaversion.org>
Subject Re: AF_UNIX sockets in APR...
Date Wed, 31 Jul 2002 03:47:10 GMT
"rbb@apache.org" <rbb@apache.org> wrote:

> On Tue, 30 Jul 2002, Justin Erenkrantz wrote:
> 
>> On Tue, Jul 30, 2002 at 05:50:40PM -0700, Pier Fumagalli wrote:
>>> While at OSCON, I chatted about having AF_UNIX support in APR with a bunch
>>> of you, and I didn't hear any negative opinion from anyone...
>>> 
>>> This would be so great for me, as it would ease my work with Java, in having
>>> a generic IO layer a little bit better than the current Java.IO and with an
>>> extensive support for all kinds of sockets...
>>> 
>>> Are there strong feelings against it? Thanks...
>> 
>> As one of the people you talked to at OSCON, here's my +1 for adding
>> it.  I've even submitted patches before to do this - the additional
>> code is quite small.  -- justin
> 
> While the code is small, to the best of my knowledge, it is also not
> portable.  If it is portable, +1.  If it is Unix only, -1.

Well, it is not a "globally portable" feature... As fork(), for instance,
which doesn't exist on Windows, but still APR supports it.

If AF_UNIX returned some APR_ENOIMPL under Windows, well, I'd be fine with
it. The PITA about not having it is that I have (and I've done that already)
to implement everything on my own, if I want to use AF_UNIX in those places
where I need it. I believe that having the advantage to use a specific
feature such as AF_UNIX (which is common to all platforms but Windows AFAIK,
dunno about OS/390, but...) in a portable way together with AF_INET sockets
IMO is FAR GREATER than checking for an APR_ENOIMPL return value when
someone under stupid Windows tries to create a socket with a path.

Look at my example here:

http://dev.betaversion.org/svn/jerry/head/jerry/java/org/betaversion/jerry/s
ocket/

I have a set of native acceptors (AF_???? server sockets), and right now,
for the stupid implementation, I cannot rely on APR, because it does not
support AF_UNIX...

http://dev.betaversion.org/svn/jerry/head/jerry/native/

So, I have to reimplement for "simplicity" also AF_INET, because in that
case, I have one "interface" (the stupid file descriptor), that works for
both of them, and I don't have to write my own little API different from
FDs, different from APR, different from everything to use FDs on AF_UNIX,
and APR on AF_INET...

If APR provided me AF_UNIX, I would just use that... Please, don't make the
same stupid mistake that Java did. I'm bashing my head on the wall everytime
I see the java.net classes because they are not extensible, and because
every time that someone wants to use AF_UNIX, they have to write it on their
own... Ok, it doesn't work on Windows, but it works on another 2 bazillions
of UNIX implementations...

Pretty please with sugar on top...

    Pier (how many times can you count "stupid" in this email?)


Mime
View raw message