[Live-devel] UDP sockets don't use ReceivingInterfaceAddr?

Patrick White patbob at imoveinc.com
Mon Feb 23 16:57:11 PST 2009


I'm trying to use ReceivingInterfaceAddr & SendingInterfaceAddr to control 
which interface RTSP/RTP traffic is going in and out on.

In setupDatagramSocket(), there is the line:

    if (port.num() == 0) addr = ReceivingInterfaceAddr;

This line is just prior to the bind() call.  So.. UDP ports are only bound to 
a particular interface if portnum is also 0.  Because of this, all the UDP 
sockets used for RTP traffic are bound to IP_ADDRANY.

Is there a particular reason for this?  Is it a multicast thing or something?  
Can I change it to make it always set addr from ReceivingInterfaceAddr?

thanks,
patbob




More information about the live-devel mailing list