bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are these bugs of commoncpp on win32 platform?


From: David Sugar
Subject: Re: Are these bugs of commoncpp on win32 platform?
Date: Mon, 28 Nov 2005 05:54:39 -0400
User-agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711)

Some may have been related to behaviors found originally in much older platform sdk's and never updated...

INADDR_NONE is usually used to "disconnect" the socket from any active connection. But if setting broadcast is nessisary, then certainly it can be done. However, then the socket may be confused with a broadcast socket, which is usually a separate class. Is it possible a different way can be done to disconnect on w32?

As to SO_REUSEADDR, I suspect that was related to some error in an old platform sdk.

Kun Niu wrote:
Dear all,

Sorry to trouble.

I've been working with ccrtp and commoncpp for a period of time. And I
found the following problems of commoncpp on win32 system.
Since I'm a new programmer, I'm not sure whether these are bugs.
So I list them here and look forward to your reply.
The commoncpp version is 1.3.21.

#1
//file socket.cpp
//line 1701
We can see that s_addr of sin_addr is INADDR_NONE.
And INADDR_NONE is defined as 0xffffffff in winsock2.h.
This is a broadcast address.
So before "connect" is called, SO_BROADCAST of socket option should be
enabled or an error will occur. And the following is my answer:

        addr.sin_family = AF_INET;
        addr.sin_addr.s_addr = INADDR_NONE;
        BOOL udpBroadcast = TRUE;
        ::setsockopt( so, SOL_SOCKET, SO_BROADCAST, ( char *
)&udpBroadcast, sizeof( udpBroadcast ) );

#2
//file peer.cpp

I don't why SO_REUSEADDR option is not enable on win32.
All the setsockopt statements set the SO_REUSEADDR parameter omit
win32 platform.
And the ccrtp's udpduplex demo fails to run on win32.
When I changed the code of commoncpp, it can work on Windowx XP sp2.

Hope that these changes will be useful.
And please inform me if I miss something.
Thanks in advance.

Sincerely,
Kun


_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-commoncpp

Attachment: dyfet.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]