We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8bdae7 commit 9e4323bCopy full SHA for 9e4323b
NTPClient.cpp
@@ -204,7 +204,7 @@ void NTPClient::sendNTPPacket() {
204
this->_udp->endPacket();
205
}
206
207
-void NTPClient::setRandomPort() {
+void NTPClient::setRandomPort(long minValue, long maxValue) {
208
randomSeed(analogRead(0));
209
- this->_port = random(1, 65534);
+ this->_port = random(minValue, maxValue);
210
NTPClient.h
@@ -47,7 +47,7 @@ class NTPClient {
47
/**
48
* Set random local port
49
*/
50
- void setRandomPort();
+ void setRandomPort(long minValue, long maxValue);
51
52
53
* Starts the underlying UDP client with the default local port
0 commit comments