• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 629
  • Last Modified:

MultiCast socket

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
maggari
Asked:
maggari
  • 3
1 Solution
 
cookreCommented:
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
 
maggariAuthor Commented:
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
 
cookreCommented:
Not with VB.
0
 
cookreCommented:
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
 
DanRollinsCommented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now