(E-Mail Removed) wrote:
>>It is usually a good idea to use INADDR_ANY.
>
> I am notusing INADDR_ANY since I'm certain that eth1 is connected
> receives the multicast packets, but should that cause any problems?
It makes your software more fragile, and one more thing the user must set up in
a config file. Just use INADDR_ANY and let the OS use the proper address.
>>I assume you are using the SO_REUSEADDR socket option because the client and
>>server are on the same computer?
>
> No. The client and the server are running on two different machines. My
> client is on the same LAN. If i don't use that option, bind fails for
> some reason.
If bind() fails then there is already another application bound to that port.
You need to find out what that is and either shut it down or use another port.
>>Generally you never need to set the IP_MULTICAST_IF option unless you have a
>>multihomed computer.
>
> Could you please explain what you mean by a multihomed computer?
Multihomed means you have two or more network cards attached to different networks.
>>Why are you setting the TTL to 0? I believe it needs to be 1 even for loopback
>>on the same computer.
>
> I don't plan to send out messages, so I don't expect setting TTL to 0
> causing any problems
Then just leave it at the default which is 1.
> I'm going to try all that you have suggested, and see if it works.
> Besides the above, do you have any other clues as to why i'm not
> getting anything in the recvfrom call?
I suspect the bind() problem could be the cause, but keep us posted.
--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com