[Live-devel] live-devel Digest, Vol 157, Issue 2 - Multiple NICs

Jeremiah Morrill Jeremiah.Morrill at econnect.tv
Tue Dec 6 14:15:59 PST 2016


(last reply got rejected, so trying again w/o trimming response)

Haven't tried this, so grain of salt.

The protected RTSPServer constructor has a parameter for the socket FD.

I think you could first, subclass the RTSPServer class so you can pass in your own socket fd.

Using system calls w/ C++ or using .NET, initialize your own socket bound to the NIC you prefer (don't forget to set it to listen and set the correct socket options, like non-blocking...follow GenericMediaServer::setUpOurSocket path for exacts).

Pass your initialized socket to a new instance of your RTSPServer subclass.

If you are initializing your socket in C#, I believe you can get the socket FD from socket.Handle.ToInt32() property...and don't let the handle be destroyed (eg, store reference to Socket object).

HTH,

-Jer

From: live-devel<mailto:warren at etr-usa.com>
Sent: Tuesday, December 6, 2016 12:40 PM
To: LIVE555 Streaming Media - development & use<mailto:live-devel at ns.live555.com>
Subject: Re: [Live-devel] live-devel Digest, Vol 157, Issue 2 - Multiple NICs

On Dec 6, 2016, at 11:55 AM, Weber, Patrick <Patrick.Weber at iecinfrared.com> wrote:
>
> Clearly I *could* do what has been suggested from within my application (the top layer is C#/.NET, so the System.Web assembly has everything needed)

Not according to this SO answer:

  https://stackoverflow.com/questions/7333764/

You may be confusing network stack routing with ASP.NET routes.  Very much not the same thing.

> it would be so much nicer to just tell Live555 which NIC to use - either by IP or MAC address

You may be able to play some games with bind() calls way down in the inner socket handling layers of Live555, but I wouldn't recommend it.

You're asking us to help you second-guess an incorrect network stack routing setup instead of configuring it correctly.

> instead of allowing Live555 to infer the NIC based on routing settings.

Live555 infers nothing.  It gives the packets to the network stack, and the network stack sends them out the network interface it decides is most appropriate based on the routing configuration.

Go read Stevens or Quinn.
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20161206/acb649d9/attachment.html>


More information about the live-devel mailing list