Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Winsock2.h and Multicast...missing definitions

Posted on 2004-10-04
2
Medium Priority
?
1,126 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 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