Am Donnerstag 22 Januar 2009 16:13:30 schrieb Gordon Henriksen:
> On 2009-01-22, at 09:19, Andreas Otto wrote:
> > 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 !!!
> >
> > [rant snipped]
> >
> >
> > Now my offter -> You support UDS until 5 Feb 2009 and I'll use your
> > library
>
> Hello Andreas,
>
> Please remember that this is an open source project and that you are
> addressing a team of volunteer contributors, all of whom have
> different priorities from you. Unless they happen to be in your
> employ, you have no standing to demand anything of any of them. If you
> need a feature, you have several straight-forward options to get it
> implemented:
>
> 1. Do it yourself.
> 2. Pay someone to do it for you.
> 3. Try to convince someone that it is important.
>
> It seems to me that your message is counterproductive to any of these.
>
> If upstream actively does not want the feature, as may be the case
> here, you have again options. You can maintain a patch locally, which
> APR makes quite practicable and entirely legal. You can branch the
> product. You can work around the limitation in your own codebase. Or,
> of course, you can opt not to use the product at all.
>
> APR already provides abstractions for features which may not be
> available on all platforms, so I would share your surprise if a
> thoughtfully implemented patch providing Unix-domain socket support
> were rejected. However, such a patch must exist before it can be
> rejected.
>
> Thank you,
> Gordon
Hi,
I allready have a working application which use TCP and UDS sockets together
with socketpair ....
the problem is:
I want to make the code more easy (this mean less code , less complicate)
I don't want to keep the OLD socket code arrount for UDS and translate the
TCP code to APR.
For me not suporting UDS is the definitly killer for APR
-> I really don't understand this becaue it is very simple to implement ...
-> It is just the sockaddr struct which is different nothing else !!!
this is my code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><
static void
sUdsFillAddress (
struct UdsS * const uds
)
{
strcpy (uds->sockaddr.sun_path, uds->file->cur.C);
uds->sockaddr.sun_family = AF_UNIX;
}
---------------------------------------------------------------------------------------------------------
static enum MqErrorE
sTcpCreateSocketAddress (
struct TcpS const * const tcp, /* the tcp object in duty */
struct sockaddr_in *sockaddrPtr, /* Socket address */
struct MqBufferS * const host, /* Host. NULL implies INADDR_ANY */
struct MqBufferS * const port /* port number */
)
{
struct hostent *hostent; /* Host database entry */
MQ_INT portU2;
// 1. convert port number into UMQ_INT
MqErrorCheck (sTcpSockGetPort (tcp, port, &portU2));
// 2. fill sockaddrPtr
(void) memset ((void *) sockaddrPtr, '\0', sizeof (struct sockaddr_in));
sockaddrPtr->sin_family = AF_INET;
sockaddrPtr->sin_port = htons ((unsigned short) (portU2 & 0xFFFF));
if (host->cursize) {
MQ_STR hoststr;
MqErrorCheck (MqBufferGetC (host, MqBufferGetC_static, &hoststr));
if (SysInetAton (host->error, hoststr, &sockaddrPtr->sin_addr) ==
MQ_ERROR) {
MqErrorReset (host->error);
MqErrorCheck (SysGetHostByName (host->error, hoststr, &hostent));
memcpy ((void *) &sockaddrPtr->sin_addr.s_addr,
(void *) hostent->h_addr_list[0], (size_t) hostent->h_length);
}
} else {
sockaddrPtr->sin_addr.s_addr = htonl (INADDR_LOOPBACK);
}
return MQ_OK; /* Success. */
error:
return MqErrorStack (MQ_ERROR_S);
}