Login  
Search All Forums
Dart Home | Custom Development Reply | General Questions Topics | Forums   
AuthorForum: General Questions
Topic: Broad/multicast problem
Techno

From: Kuwait, Kuwait
Posts: 2
Member Since: 06/26/06
posted June 27, 2006 8:58 AM

hi there,
I m new to dart technologies currently i used the sockets for .Net, well scnario is i have an IP where there is some data coming from (213.xxx.xxx.xxx) and Port (1000), Now i have 30 computers on the LAN where i want to send this data. I succesfully can reterive the data using TCP components but when it comes to UDP i am using the following code
 Dim add As System.Net.IPAddress = System.Net.IPAddress.Parse("239.255.255.254")
    Udp1.Open("192.168.0.55", 1116)
    Udp1.JoinMulticastGroup(add)
Multicasting (assuming the host has multiple interfaces)
    Udp1.MulticastInterface = System.Net.IPAddress.Parse("192.168.0.55")
    Udp1.MulticastTimeToLive = 2
    Dim obj As Object = ""
    obj = "0|2750|2950|<2B|10000|2|29250000|hP$KS|337456|51=L$KB|337457|51=< "
     Udp1.Send(obj, "192.168.0.55", 1116)
In this scnario i cant find where i am making a mistake so that my application on all computers on LAN can connect to this data or which address i can provide in my applications on LAN to get the multicast or how i can send it to the LAN machines.

This is only thing to make me wait to purchase the licence, if i can get the answer soon would be Grateful to Dart.com and its Team
Thanks
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted June 28, 2006 10:54 AM

Hello,

I have read your query and it is my understanding that you are looking to multicast the data to different hosts over the LAN.

If this is the said scenario, then please note that the 30 hosts over the LAN have to join a multicast group. Multicast groups are specified as an IP Address within a specified range of addresses. These groups of addresses, also known as class D IP Addresses, are in the range from 224.0.0.0 through 239.255.255.255.

The participating hosts simply need to join a multicast group in this range and then send datagrams to this multicast group address.

I have tried your code snippet at my end, however not getting the desired results. I would suggest you to change the following code in your application:

Udp1.Send(obj, "192.168.0.55", 1116)

To

Udp1.Send(obj,"239.255.255.254",1116)

The reason for this is that, to multicast the data to different hosts, the second parameter in the send method should be an address where all of the hosts have joined a Multicast group.

You may also use add.ToString() instead of “239.255.255.254”.


I hope this will be of help. In case, I have misunderstood the issue or you need further assistance/ clarifications, please feel free to write back and I would be glad to assist you.

Have a nice day ahead.

Best Regards,
Amit


Techno

From: Kuwait, Kuwait
Posts: 2
Member Since: 06/26/06
posted June 29, 2006 8:17 AM

Hi Amit
Thanks for your worthy suggestion,
I would like to ask 2 more things.i.e.
1st - How and on which address my client application will connect? and which IP ihave to provide to my client application on LAN.

2nd - How can client join multi cast group on my server ( Multicaster) can u pls explain these things which i might be doing wrong.

Thanks
Amit

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted June 30, 2006 3:51 PM

Hello,

Thanks for writing back.

I have read your query and it is my understanding that you are looking to multicast the data to different hosts over the LAN.

If this is the said scenario, then please note that the different hosts over the network have to join a multicast group.

(1) The client application will connect through the following code snippet:

Udp1.Open(“String host”, intPort)

The string host would be the local IP address of the machine hosting the application.

(2) To join multicast group on a server, you need to add the following code:

Udp1.JoinMulticastGroup(add)

Add should be declared likewise in the following code:

Dim add As System.Net.IPAddress = System.Net.IPAddress.Parse("IPADDRESS")

Here, the IPADDRESS has to be of Class D range (224.0.0.0 through 239.255.255.255)

I hope this will be of help. In case of further assistance/ clarifications, please feel free to write back and I would be glad to assist you.

Have a nice day ahead.

Best Regards,
Amit
Reply | General Questions Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX