From e36537d32a686bbe4dfa224beadd819a80393ef8 Mon Sep 17 00:00:00 2001 From: powergt Date: Wed, 5 Aug 2015 13:45:24 +0200 Subject: [PATCH 1/2] Update UIPServer.cpp added function to change port on the fly --- UIPServer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UIPServer.cpp b/UIPServer.cpp index 21c7ef5..08ddecc 100644 --- a/UIPServer.cpp +++ b/UIPServer.cpp @@ -26,6 +26,12 @@ UIPServer::UIPServer(uint16_t port) : _port(htons(port)) { } +//added function to change port on the fly +void UIPServer::setport(uint16_t port) +{ + _port=htons(port); +} + UIPClient UIPServer::available() { UIPEthernetClass::tick(); From fb70cdc81c8bbc7a63b5d78d3d81a1b2b14788a8 Mon Sep 17 00:00:00 2001 From: powergt Date: Wed, 5 Aug 2015 13:49:19 +0200 Subject: [PATCH 2/2] Update UIPServer.h added function to change port on the fly --- UIPServer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/UIPServer.h b/UIPServer.h index 0cc0619..5683e8a 100644 --- a/UIPServer.h +++ b/UIPServer.h @@ -32,6 +32,7 @@ class UIPServer : public Server { size_t write(uint8_t); size_t write(const uint8_t *buf, size_t size); using Print::write; + void setport(uint16_t _port); //added function to change port on the fly private: uint16_t _port;