[Live-devel] setupDatagramSocket - SO_REUSEADDR problems

Rawling, Stuart SRawling at pelco.com
Tue Mar 10 20:31:37 PDT 2009


Hi,

I tried an experiment running 2 openRTSP processes in the testProgs folder.
They connected to the same URL (an Axis Camera), and they both used the same
client_ports.  The server handled the connection on different ports, but the
client_port reported in the Transport Section were the same.

Should this be the case on separate processes?

Stuart

On 3/10/09 6:56 PM, "Ross Finlayson" <finlayson at live555.com> wrote:

>> >Hi,
>> >I've found that in some cases (it seems to be random) the method
>> >mediaSubsession::initiate will use the same UDP ports for both a
>> >video stream and an audio stream. A sample output for the openRTSP
>> >program is the following:
>> >
>> >
>> >Created receiver for "video/MP4V-ES" subsession (client ports 34394-34395)
>> >Created receiver for "audio/PCMU" subsession (client ports 34394-34395)
>> >Setup "video/MP4V-ES" subsession (client ports 34394-34395)
>> >Setup "audio/PCMU" subsession (client ports 34394-34395)
>> >
>> >
>> >The problem seems to be the SO_REUSEPORT socket option on the
>> >setupDatagramSocket function.
>> >So, my question is: Is it safe to disable that option?
> 
> The SO_REUSEPORT option is intended to allow more than one process -
> on the same host - to use the same (explicit) socket number.  For
> example, it allows more than one application to receive the same
> multicast stream, or, in the case of a unicast stream, it allows a
> different process to receive it than the actual RTSP client (e.g.,
> the "-r" option to "openRTSP").  It should not be allowing the OS to
> hand out the same ephemeral port number more than once.  If your OS
> is doing this, then it may be buggy.
> 
> If you're not anticpating any other process on the client host from
> receiving the stream, then you could probably get away with not
> setting SO_REUSEPORT.  However, fixing your buggy OS is probably the
> better option :-)
> 
> --
> 
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
> 



- ------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to administrator at pelco.com and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. 
- ------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090310/3c837cc8/attachment-0001.html>


More information about the live-devel mailing list