You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mathias Brossard <ma...@idealx.com> on 2006/04/27 14:42:37 UTC
unix/local domain sockets
Hi,
I've been looking at the mailing-list archives to understand why
PF_UNIX / PF_LOCAL sockets (and the AF_UNIX / AF_LOCAL address family
counterpart) are not supported in APR. The reason (from what I
understand) seems to be that this feature doesn't exist in Win32.
Some proposals have been made (return APR_ENOTIMPL on platforms that
don't support it, use of named pipes), but I haven't seen any conclusion.
My general question is : what is the current position on unix/local
domain sockets support in APR ? My speculations are:
- It can't be properly implemented in Win32, this goes against some
"don't add any feature that's not portable" policy.
- This issue is just waiting for a proper patch, otherwise there's no
reason not to support it.
- Not enough users have complained about this so it doesn't seem
important (although misc/unix/rand.c uses unix socket for access to EGD).
Sincerely,
--
Mathias Brossard <ma...@idealx.com>
Re: unix/local domain sockets
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/27/06, Mathias Brossard <ma...@idealx.com> wrote:
> Hi,
>
> I've been looking at the mailing-list archives to understand why
> PF_UNIX / PF_LOCAL sockets (and the AF_UNIX / AF_LOCAL address family
> counterpart) are not supported in APR. The reason (from what I
> understand) seems to be that this feature doesn't exist in Win32.
> Some proposals have been made (return APR_ENOTIMPL on platforms that
> don't support it, use of named pipes), but I haven't seen any conclusion.
>
> My general question is : what is the current position on unix/local
> domain sockets support in APR ? My speculations are:
> - It can't be properly implemented in Win32, this goes against some
> "don't add any feature that's not portable" policy.
> - This issue is just waiting for a proper patch, otherwise there's no
> reason not to support it.
> - Not enough users have complained about this so it doesn't seem
> important (although misc/unix/rand.c uses unix socket for access to EGD).
I believe the current issue is simply that there's no equivalent on
win32. That said, it's not all that hard to write portable unix
domain socket code, and the apr_portable.h file gives you the ability
to shove the resulting file descriptor into an apr_socket_t so you can
use it with apr functions.
-garrett
Re: unix/local domain sockets
Posted by Mathias Brossard <ma...@idealx.com>.
Colm MacCarthaigh wrote:
> On Thu, Apr 27, 2006 at 02:42:37PM +0200, Mathias Brossard wrote:
>> - This issue is just waiting for a proper patch, otherwise there's no
>> reason not to support it.
>
> Are there any particular portability problems with the standard UNIX
> way of creating the sockets?
The only one I can think of is the fact that the sun_path member of
struct sockaddr_un might have different sizes on different platforms.
The EGD code in misc/unix/rand.c checks for this (line 156 in APR 1.2.7).
Sincerely,
--
Mathias Brossard <ma...@idealx.com>
Re: unix/local domain sockets
Posted by Colm MacCarthaigh <co...@stdlib.net>.
On Thu, Apr 27, 2006 at 02:42:37PM +0200, Mathias Brossard wrote:
> - This issue is just waiting for a proper patch, otherwise there's no
> reason not to support it.
Are there any particular portability problems with the standard UNIX
way of creating the sockets?
--
Colm MacCárthaigh Public Key: colm+pgp@stdlib.net