<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 6:07 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">> In order to get better performance over WIFI when doing RTP over TCP interleaved, I am setting the IP TOS field to "expedited forwarding" and I am doing that in the following function:<br>
><br></span></blockquote><div><br></div><div>If you don't want to mess with the code, and if you are using Linux, you can use iptables to set the tos field:<br><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace;color:rgb(0,0,0)">iptables -v -A OUTPUT -t mangle -m owner --uid-owner totolos -j TOS --set-tos </span><font color="#000000" face="monospace">Minimize-Delay</font><br> </div><div>In this example, I'm  doing the simplest thing possible and assuming that your code is running under its own userid, and that you want all packets sent out to have that TOS.  You can, of course, use any selectors that iptables supports, such as cgroups, or a list of ports, or whatever.</div><div><br></div><div>\/-/</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> GenericMediaServer::<wbr>incomingConnectionHandlerOnSoc<wbr>ket<br>
><br>
> But this changes the live555 library itself. Is there any other way to do this without having to change the live555 library itself?<br>
<br>
</span>What I would do is subclass “RTSPServer”, and - in your subclass - reimplement the “createNewClientConnection()” virtual function, as follows:<br>
<br>
ClientConnection* myRTSPServerSubclass::<wbr>createNewClientConnection(int clientSocket, struct sockaddr_in clientAddr) {<br>
        // Do whatever you need to do to set the IP TOS field (for “clientSocket”).<br>
<br>
        return RTSPServer::<wbr>createNewClientConnection(<wbr>clientSocket, clientAddr);<br>
}<br>
<br>
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" rel="noreferrer" target="_blank">http://www.live555.com/</a><br>
<span class="gmail-"><br>
<br>
______________________________<wbr>_________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" rel="noreferrer" target="_blank">http://lists.live555.com/<wbr>mailman/listinfo/live-devel</a><br>
<br>
--<br>
You received this message because you are subscribed to the Google Groups "Liverwurst" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:liverwurst%2Bunsubscribe@owal.io">liverwurst+unsubscribe@owal.io</a><wbr>.<br>
To post to this group, send email to <a href="mailto:liverwurst@owal.io">liverwurst@owal.io</a>.<br>
</span>To view this discussion on the web visit <a href="https://groups.google.com/a/owal.io/d/msgid/liverwurst/712CFB74-9C0B-4795-93FB-3B36B36569E4%40live555.com" rel="noreferrer" target="_blank">https://groups.google.com/a/<wbr>owal.io/d/msgid/liverwurst/<wbr>712CFB74-9C0B-4795-93FB-<wbr>3B36B36569E4%40live555.com</a>.<br>
</blockquote></div><br></div></div>