Solved

MultiCast socket

Posted on 2002-03-31
5
612 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
  • 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

831 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