?
Solved

Winsock2.h and Multicast...missing definitions

Posted on 2004-10-04
2
Medium Priority
?
1,121 Views
Last Modified: 2013-12-03
I am currently trying to write some networking code in Visual C++ while trying to maintain cross platform compatibility.  My current issue is that I am trying to figure out how to setup a multicast connection and join and leave groups.  I already have some code which is just creating and binding a socket and then setting some options.  This stuff works fine, when I try to start playing with multi cast I start running into problems, such as winsock2.h does not define many of the multicast data structures and #defines, such as ip_mreq, and IP_ADD_MEMBERSHIP.  I found that these are defined in Ws2tcpip.h if I try to include this file I starti running into tons a of redfines.  What is the best approach to networking in windows while still maintaining maximal cross platform compatibility.  So I guess my first question is what do I need to include to get Multicast working, I would like to avoid all the WSA* calls.  What then is the best way to then starting join Multicast groups.

Thanks
0
Comment
Question by:mvoiers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:mvoiers
ID: 12221866
sigh...I was doing out of order include I gues for the Ws2tcpip.h file, once I ensured that winsock2.h was include before Ws2tcpip I was then able to refrence the Multicast related structures.  So that still leaves me with my other question what steps do I take to join a group preferable without the WSA* functions.  Is there a good code snipet that demonstrates this?

0
 
LVL 8

Accepted Solution

by:
mxjijo earned 800 total points
ID: 12222610
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question