<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Mon, Sep 26, 2016 at 6:13 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>> + env << "Bad port number (@1): " << port.num() << "\n";<br>
> return -1;<br>
> }<br>
> #if defined(__WIN32__) || defined(_WIN32)<br>
><br>
> Now, whenever a client connects to the proxy, I get errors such as:<br>
><br>
> Bad port number (@1): 14875<br>
> Bad port number (@1): 15131<br>
<br>
</span>You realize, I hope, that the function “Port:num()” returns the port number in network byte order. If you want to see the actual port number (in host order), you should be outputting “ntohs(port.num())”<br>
<span></span></blockquote><div><br></div></span><div>red face time... failed like a n00b :)</div><div><br></div><div>here's the correct output:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Bad port number (@1): 6970 (0x1b3a)
</span><br>Bad port number (@1): 6971 (0x1b3b)
<br>Bad port number (@1): 6972 (0x1b3c)
<br>Bad port number (@1): 6973 (0x1b3d)
<br>Bad port number (@1): 6974 (0x1b3e)
<br>Bad port number (@1): 6975 (0x1b3f)
<br>Bad port number (@1): 6976 (0x1b40)
<br>Bad port number (@1): 6977 (0x1b41)
<br>...<br></span>This is, of course, <span style="font-family:monospace;color:rgb(0,0,0)">initialPortNum = 6970 </span>from </div><div><span style="font-family:monospace"> </span><span style="color:rgb(0,0,0);font-family:monospace">liveMedia/include/<wbr>ProxyServerMediaSession.hh</span></div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
<br>
> In trying to debug something probably unrelated to this<br>
<br>
</span>Please tell us what problem that you’re *really* having, rather than trying to diagnose the problem yourself.<br>
<br>
<br></blockquote><div><br></div></span><div>I'm trying to run multiple proxy processes on the same machine, each connecting to a different back end ("why multiple processes?", I hear you ask. Well, the back ends may come and go, and reappear on different addresses, and I don't want to restart *everything* when that happens)</div><div><br></div><div>What I was trying to figure out was how get the proxy to just terminate if the specified port in the -p option was not available (so that I would then restart it with a different port). I added diagnostic statements wherever a port number was being allocated, and got confused about the UDP port being allocated in <span style="color:rgb(0,0,0);font-family:monospace">setupDatagramSocket()</span> <wbr>returning with errors.</div><div><br></div><div>Now, a better question is, what's magic about 6970 and why does the (apparenly not significant) choice of port start at that value? Why not just create the socket and just get the port that was allocated to it by the kernel (from the range in the local port range, in linux: <span style="font-family:monospace;color:rgb(0,0,0)">net.ipv4.ip_local_port_</span><span style="font-family:monospace;color:rgb(0,0,0)"><wbr>range = 32768 60999</span>)?</div><div><br></div><div>Cheers,</div><div><br></div><div>\/-/</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" rel="noreferrer" target="_blank">http://www.live555.com/</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">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/mailm<wbr>an/listinfo/live-devel</a><br>
<span><font color="#888888"><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" target="_blank">liverwurst+unsubscribe@owal.io</a><wbr>.<br>
To post to this group, send email to <a href="mailto:liverwurst@owal.io" target="_blank">liverwurst@owal.io</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/a/owal.io/d/msgid/liverwurst/B3C977D5-7189-4AB6-AE7A-287D27E35176%40live555.com" rel="noreferrer" target="_blank">https://groups.google.com/a/ow<wbr>al.io/d/msgid/liverwurst/B3C97<wbr>7D5-7189-4AB6-AE7A-287D27E3517<wbr>6%40live555.com</a>.<br>
</font></span></blockquote></span></div><br></div></div>
</div><br></div>