473,698 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multicast Question

I'm streaming quicktime H264 movies to 224.1.2.3:554. Why, in my
MulticastReceiv er class of another application, have I have to bind my
socket locally on the same remote port (554) in order to receive the
multicast packets (with the primitive receive)? Why can't I bind to
another port and still receive the packets? Below is the source code
I'm using to initialize the receiver.

---------------------------------
public MulticastReceiv er(string remoteIPAddress ,int remotePort)
{
//Create multicast receiver socket
socket=new
Socket(AddressF amily.InterNetw ork,SocketType. Dgram,ProtocolT ype.Udp);
IPEndPoint ep=new IPEndPoint(IPAd dress.Any,remot ePort);
socket.Bind(ep) ;
IPAddress ip=IPAddress.Pa rse(remoteIPAdd ress);
socket.SetSocke tOption(SocketO ptionLevel.IP,S ocketOptionName .AddMembership, new
MulticastOption (ip,IPAddress.A ny));
}

Jan 25 '06 #1
7 4874
Nuno Magalhaes wrote:
I'm streaming quicktime H264 movies to 224.1.2.3:554. Why, in my
MulticastReceiv er class of another application, have I have to bind my
socket locally on the same remote port (554) in order to receive the
multicast packets (with the primitive receive)? Why can't I bind to
another port and still receive the packets? Below is the source code
I'm using to initialize the receiver.


The point of specifying the port is to effectively say what you're
interested in. There may be any number of applications spitting packets
at your IP address. If all ports saw all packets, you'd see all the
packets from all of those applications.

Jon

Jan 25 '06 #2
But it's not at my IP address it's from 10.154.0.104:60 00 to
224.1.2.3:554.
From another application on another computer, I can only receive the

224.1.2.3 multicast packets if I'm bind to the local port 554 on the
local IP address. That leaves no room for multiple instances of
applications running on the same machine capture the multicast packets.

Jan 25 '06 #3
I'm not saying that one port should see all packets. It's a multicast
packet.
It's impossible for two applications on the same machine receive
packets from the endpoint 224.1.2.3:554 since they need to
simultaneously bind the socket on local machine port 554.

Jan 25 '06 #4
Nuno Magalhaes wrote:
I'm not saying that one port should see all packets. It's a multicast
packet.
It's impossible for two applications on the same machine receive
packets from the endpoint 224.1.2.3:554 since they need to
simultaneously bind the socket on local machine port 554.


Okay, I see what you're saying. I'll see what I can find out.

Jon

Jan 25 '06 #5
I've tested my NetworkEmulator application (that works like a router)
and the only way to work is this:

1) RTPServer(H264) broadcasting to 224.1.2.3:554 (local port 6000)
2) NetworkEmulator from 224.1.2.3:554 to 224.1.2.4:555 (local port
6002)
3) NetworkEmulator from 224.1.2.4:555 to 224.1.2.5:556 (local port
6001)
4) NetworkEmulator from 224.1.2.5:556 to 224.1.2.6:557 (local port
6003)

Checked ethereal all on the same machine and there were entries to all
this addresses/ports (almost 120 packets/s). We have to use always
different addresses and ports and each pair address/port can only be
used once by an application simultaneously running on the same machine.

With the limitation that the Receiver function can only be bound to
port 554, 555 or 556 in this example in order to receive those packets.

Jan 25 '06 #6
Nuno Magalhaes wrote:
I've tested my NetworkEmulator application (that works like a router)
and the only way to work is this:
<snip>
With the limitation that the Receiver function can only be bound to
port 554, 555 or 556 in this example in order to receive those packets.


Right. So does that mean you don't need me to do any more digging?

Jon

Jan 25 '06 #7
Not for now :-)

Jan 25 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6501
by: PHLICS_Admin | last post by:
Hi All, There are two network cards in one computer (named A) , and there is one network card in another computer(named B). On computer A: one network card is used to connect to internet, and the other network card is used in intranet whose ipaddress is 192.168.0.1 On computer B: the network card's ipaddress is 192.168.0.2. These two computer can connect to each other.
1
1650
by: PHLICS_Admin | last post by:
Hi All, There are two network cards in one computer (named A) , and there is one network card in another computer(named B). On computer A: one network card is used to connect to internet, and the other network card is used in intranet whose ipaddress is 192.168.0.1 On computer B: the network card's ipaddress is 192.168.0.2. These two computer can connect to each other.
0
1032
by: PHLICS_Admin | last post by:
Hi All, There are two network cards in one computer (named A) , and there is one network card in another computer(named B). On computer A: one network card is used to connect to internet, and the other network card is used in intranet whose ipaddress is 192.168.0.1 On computer B: the network card's ipaddress is 192.168.0.2. These two computer can connect to each other.
7
7703
by: Jim H | last post by:
Is there something special I need to do to send data to a multicast IP and have it go across a router? Router is a Win2000 Server connecting 2 networks via RRAS PPTP. The routing appears to be working because I can ping the multicast address and get responses from the server on the other network. I didn't think ping would work like that but as long as I have the server process running I can ping the multicast IP and get a response. The...
2
2112
by: Naveen Mukkelli | last post by:
Hi, I'm sending multicast messages UDP socket and C#. But the receiving clients are not receiving all the messages. Receiving clients are missing out some messages. When I debug the server side, the messages are being sent correctly, but receiving side side is missingout some messages. What could be the problem and how can we solve this problem.
5
3875
by: GVN | last post by:
Hi All, I recently worked on delegates. But I have a question regarding Multicast delegates. The scenario is as follows: I have a delegate myDelegate with object dlgt, and two methods myMethod1(), and myMethod2(). Using multicast delegates definition I can write as follows to add the two methods to my multicast delegate:
7
8455
by: pietro.cerutti | last post by:
Hi guys, I have a daemon running on Debian and listening for multicast packets sent to 224.0.0.251:5353 (ZeroConf Multicast DNS queries). The server is plugged into a VLAN trunk with eth0 and joins several VLANs using virtual interfaces (i.e. eth0.xxx). It should be able to capture the UDP packets on any interfaces, so it spawns a thread for each interface specified in a config file, and for each thread it creates a socket: ...
0
1163
by: zig158 | last post by:
My application will use a multicast channel for contacting peers on the network running the application, like mDNS. I have some sample code that works great on my local machine, but have a question how they will react on a multi router network. This code is currently 2 apps but will eventually be one multi thread app. This is the send code... public static void Main() { UdpClient sock = new UdpClient(); ...
5
8918
by: AliRezaGoogle | last post by:
Hi, I have a conceptual question on Events and Multicast Delegates. Let me explain: As we know an event is a multicast delegate. What we declare as an event is inherently a multicast delegate. I really do not undrestand what additional features the "event" keyword adds to multicast delegate. The only thing that I see as an additional feature is a "Thunder Icon" near event name in VS IDE when intellisense works;).
5
3772
by: Svinja | last post by:
Hello, i was reading an article on multicasting on Microsoft TechNet and it says that if i want to implement multicast on my network i need this: i am using multicast on my LAN and it works without router. That is my question - how can multicast work without router? It may seem like a stupid question but i really need an answer...thx
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.