You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2009/02/16 15:27:33 UTC
Re: Porting to APR failed
Andreas Otto wrote:
> Dear APR Support Team,
>
> some time ago I made the strategic decision to port my software:
>
> http://libmsgque.sourceforge.net/
>
> to APR by able to use all of the nice features.
>
> Some days ago I finally start to do this job ... but today I got a massive
> disappointment ...
>
> You ask why ?
>
> It's the UNIX Domain Socket issue !!!
>
> well Unix-Domains are very beautiful in terms of usability
>
> you only have to create the "sockaddr_un" as part of "sockaddr"
> and you can use the same code you allready written for
> network sockets to use local sockets
>
> The main advantages are:
>
> 1. 50% faster as network sockets (on linux)
> 2. absolute secure -> no network access
>
> now the problem:
>
> APR does not support Unix Domain Sockets
>
Perhaps it will in the future.
Here is a patch that allows to do that.
The apr_sockadr_local_get could be included
inside apr_sockaddr_info_get and use hostname
for filename.
Not sure if some addr functions need some extra
check for AF_UNIX, since they'll probably
fail or return some junk. Nevertheless
I doubt they are useful anyhow for domain sockets.
I've tested the API, and bind/connect/accept
works fine. However probably there will be
needed some unlik callback on bind.
Regards
--
^(TM)