Solved

Winsock2.h and Multicast...missing definitions

Posted on 2004-10-04
2
1,104 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
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 200 total points
ID: 12222610
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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 …
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 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