N
Nuno Magalhaes
I'm streaming quicktime H264 movies to 224.1.2.3:554. Why, in my
MulticastReceiver 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 MulticastReceiver(string remoteIPAddress,int remotePort)
{
//Create multicast receiver socket
socket=new
Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp);
IPEndPoint ep=new IPEndPoint(IPAddress.Any,remotePort);
socket.Bind(ep);
IPAddress ip=IPAddress.Parse(remoteIPAddress);
socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.AddMembership,new
MulticastOption(ip,IPAddress.Any));
}
MulticastReceiver 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 MulticastReceiver(string remoteIPAddress,int remotePort)
{
//Create multicast receiver socket
socket=new
Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp);
IPEndPoint ep=new IPEndPoint(IPAddress.Any,remotePort);
socket.Bind(ep);
IPAddress ip=IPAddress.Parse(remoteIPAddress);
socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.AddMembership,new
MulticastOption(ip,IPAddress.Any));
}