Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions UIPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions UIPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down