Solved

MultiCast socket

Posted on 2002-03-31
5
618 Views
Last Modified: 2013-11-13
I am working on a client/server app for which I am using VB's WinSock control. For unicasting, its all good. In my case, the client can send messages to the server like a normal unicast client would do. However, for every mesg received from any of the unicast clients, the server responds through multicasting. I have no control on the server i.e I have to stick with server's multicast mechanism. Now, how would I make my client join the multicast group to read the replies from the server. I hope there is a way to create a multicast socket. Ideas are greatly appreciated, of course, with the points.

thanks
0
Comment
Question by:maggari
[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
  • 3
5 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 6909468
To do that in VB you'll have to go to .net since, as I'm sure you've figured out, the VB Winsock control doesn't have a joinGroup method.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemNetSocketsUdpClientClassJoinMulticastGroupTopic2.asp

Of course, if your IP were one the server was broadcasting to, then all you'd have to do is add another Winsock control to listen on the appropriate port.
0
 

Author Comment

by:maggari
ID: 6909508
No, its broadcasting to a multicast address..  So, will that mean i can't do this if i don't have a .net environment?
0
 
LVL 22

Expert Comment

by:cookre
ID: 6909513
Not with VB.
0
 
LVL 22

Accepted Solution

by:
cookre earned 100 total points
ID: 6909516
Strike that.  This is for C, but it may transfer over to VB:

http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/

(scroll down to Receiving Multicast Datagrams)



0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7638005
Hi maggari,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept cookre's comment(s) as an answer.

maggari, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

687 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