aboutsummaryrefslogtreecommitdiff
path: root/libraries/Bridge/YunServer.h
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-07-01 19:09:43 +0200
committerCristian Maglie <c.maglie@bug.st>2013-07-01 19:12:49 +0200
commitef0f1e593f7af6463642154ec1eb675e1231cb45 (patch)
tree1956be57b42219da85a63e6e1e1141c28b9e73b2 /libraries/Bridge/YunServer.h
parenta22033dd5d1b867def45b80d607592bf76cde052 (diff)
YunServer: added method to allow listening on localhost only
Diffstat (limited to 'libraries/Bridge/YunServer.h')
-rw-r--r--libraries/Bridge/YunServer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/Bridge/YunServer.h b/libraries/Bridge/YunServer.h
index e1be55a..eb16703 100644
--- a/libraries/Bridge/YunServer.h
+++ b/libraries/Bridge/YunServer.h
@@ -35,9 +35,13 @@ public:
virtual size_t write(uint8_t c) { /* TODO */ }
+ void listenOnLocalhost() { useLocalhost = true; }
+ void noListenOnLocalhost() { useLocalhost = false; }
+
private:
uint16_t port;
bool listening;
+ bool useLocalhost;
BridgeClass &bridge;
};