Solved

MultiCast socket

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 56
Access 2013 combo box not working 3 38
vb6 connector to mongodb 2 48
Visual Studio search word table and return Cell index 8 48
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

912 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

21 Experts available now in Live!

Get 1:1 Help Now