Skip to content

Commit 8c91a00

Browse files
committed
https://github.com/ntruchsess/arduino_uip/pull/122
1 parent 593017d commit 8c91a00

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

UIPServer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ UIPServer::UIPServer(uint16_t port) : _port(htons(port))
2626
{
2727
}
2828

29+
//added function to change port on the fly
30+
void UIPServer::setport(uint16_t port)
31+
{
32+
_port=htons(port);
33+
}
34+
2935
UIPClient UIPServer::available()
3036
{
3137
UIPEthernetClass::tick();

UIPServer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class UIPServer : public Server {
3232
size_t write(uint8_t);
3333
size_t write(const uint8_t *buf, size_t size);
3434
using Print::write;
35+
void setport(uint16_t _port); //added function to change port on the fly
3536

3637
private:
3738
uint16_t _port;

0 commit comments

Comments
 (0)