apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Porting to APR failed
Date Mon, 16 Feb 2009 14:27:33 GMT
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)

Mime
View raw message