Solved

Winsock2.h and Multicast...missing definitions

Posted on 2004-10-04
2
1,099 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
2 Comments
 

Author Comment

by:mvoiers
Comment Utility
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 200 total points
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now