Using the Arduino Yún Bridge example sketch, I am able to change the Pin13 LED state both from an internal and external ip, but I have two issues.
The first issue I have is not understanding why all 3 of the following substitutions allow me to connect both internally and externally and change the LED state:
server.listenOnLocalhost(); // I thought this excluded external connections?
server.noListenOnLocalhost(); // I thought this was necessary to connect externally?
// server.listenOnLocalhost(); //Commented out. Still works.
The second issue I have is not understanding why the following substitution causes the following error on the external connection: "Could not connect to Yunserver 146 connection refused":
YunServer server(8081); //I thought this would allow me to forward the external connection
//through my router to the Yun port 8081?
I am able to change the Yun port by leaving the line as is:
YunServer server;
and editing the upphtd file. Then I am able to forward the external connection to the Yun port 8081.
So even though I can get the behavior I want, I still would like to understand what's going on.