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));
}
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));
}
Comment