Solved

MultiCast socket

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

757 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

18 Experts available now in Live!

Get 1:1 Help Now