Skip to content

Commit 081e8c7

Browse files
committed
Correct typos in comments and documentation
1 parent 54cd20d commit 081e8c7

File tree

9 files changed

+45
-49
lines changed

9 files changed

+45
-49
lines changed

MDNS.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ MDNSError_t MDNS::_sendMDNSMessage(uint32_t /*peerAddress*/, uint32_t xid, int t
402402
ptr += slen;
403403
}
404404

405-
// PTR record (for the dns-sd service in general)
405+
// PTR record (for the DNS-SD service in general)
406406
this->_writeDNSName((const uint8_t*)DNS_SD_SERVICE, &ptr, buf,
407407
sizeof(DNSHeader_t), 1);
408408

@@ -783,9 +783,9 @@ MDNSError_t MDNS::_processMDNSQuery()
783783
for (j=0; j<MDNS_MAX_SERVICES_PER_PACKET; j++) {
784784
if (NULL != ptrNames[j] && ptrNamesMatches[j]) {
785785
// only compare the part we have. this is incorrect, but good enough,
786-
// since actual MDNS implementations won't go here anyways, as they
786+
// since actual mDNS implementations won't go here anyways, as they
787787
// should use name compression. This is just so that multiple Arduinos
788-
// running this MDNSResponder code should be able to find each other's
788+
// running this mDNSResponder code should be able to find each other's
789789
// services.
790790
if (ptrLensCmp[j] >= ir)
791791
ptrNamesMatches[j] &= this->_matchStringPart(&ptrNamesCmp[j],
@@ -800,7 +800,7 @@ MDNSError_t MDNS::_processMDNSQuery()
800800
} while (rLen > 0 && rLen <= 128);
801801

802802
// if this matched a name of ours (and there are no characters left), then
803-
// check wether this is an A record query (for our own name) or a PTR record query
803+
// check whether this is an A record query (for our own name) or a PTR record query
804804
// (for one of our services).
805805
// if so, we'll note to send a record
806806
if (i < qCnt)
@@ -982,7 +982,7 @@ MDNSError_t MDNS::_processMDNSQuery()
982982
for (j=0; j<MDNS_MAX_SERVICES_PER_PACKET; j++) {
983983
if (servIPs[j][0] == ptrIPs[i] || servIPs[j][0] == 255) {
984984
// the || part is such a hack, but it will work as long as there's only
985-
// one A record per MDNS packet. fucking DNS name compression.
985+
// one A record per mDNS packet. fucking DNS name compression.
986986
ipAddr = &servIPs[j][1];
987987

988988
break;
@@ -1051,7 +1051,7 @@ void MDNS::run()
10511051
uint8_t i;
10521052
unsigned long now = millis();
10531053

1054-
// first, look for MDNS queries to handle
1054+
// first, look for mDNS queries to handle
10551055
(void)_processMDNSQuery();
10561056

10571057
// are we querying a name or service? if so, should we resend the packet or time out?

examples/Ethernet/DiscoveringServices/DiscoveringServices.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void setup()
4848

4949
// Initialize the mDNS library. You can now reach or ping this
5050
// Arduino via the host name "arduino.local", provided that your operating
51-
// system is mDNS/Bonjour-enabled (such as MacOS X).
51+
// system is mDNS/Bonjour-enabled (such as macOS).
5252
// Always call this before any other method!
5353
mdns.begin(Ethernet.localIP(), "arduino");
5454

@@ -70,7 +70,7 @@ void loop()
7070
char serviceName[256];
7171
int length = 0;
7272

73-
// read in a service name from the Arduino IDE's serial monitor.
73+
// read in a service name from the Arduino IDE's Serial Monitor.
7474
while (Serial.available()) {
7575
serviceName[length] = Serial.read();
7676
length = (length+1) % 256;
@@ -108,7 +108,7 @@ void loop()
108108
mdns.run();
109109
}
110110

111-
// This function is called when a name is resolved via MDNS/Bonjour. We set
111+
// This function is called when a name is resolved via mDNS/Bonjour. We set
112112
// this up in the setup() function above. The name you give to this callback
113113
// function does not matter at all, but it must take exactly these arguments
114114
// as below.
@@ -159,4 +159,3 @@ void serviceFound(const char* type, MDNSServiceProtocol /*proto*/,
159159
}
160160
}
161161
}
162-

examples/Ethernet/RegisteringServices/RegisteringServices.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ void setup()
4848

4949
// Initialize the mDNS library. You can now reach or ping this
5050
// Arduino via the host name "arduino.local", provided that your operating
51-
// system is mDNS/Bonjour-enabled (such as MacOS X).
51+
// system is mDNS/Bonjour-enabled (such as macOS).
5252
// Always call this before any other method!
5353
mdns.begin(Ethernet.localIP(), "arduino");
5454

5555
// Now let's register the service we're offering (a web service) via mDNS!
5656
// To do so, we call the addServiceRecord() method. The first argument is the
5757
// name of our service instance and its type, separated by a dot. In this
5858
// case, the service type is _http. There are many other service types, use
59-
// google to look up some common ones, but you can also invent your own
59+
// Google to look up some common ones, but you can also invent your own
6060
// service type, like _mycoolservice - As long as your clients know what to
6161
// look for, you're good to go.
6262
// The second argument is the port on which the service is running. This is
@@ -84,16 +84,16 @@ void loop()
8484
// in the browser when you connect.
8585
EthernetClient client = server.available();
8686
if (client) {
87-
// an http request ends with a blank line
87+
// an HTTP request ends with a blank line
8888
bool current_line_is_blank = true;
8989
while (client.connected()) {
9090
if (client.available()) {
9191
char c = client.read();
9292
// if we've gotten to the end of the line (received a newline
93-
// character) and the line is blank, the http request has ended,
93+
// character) and the line is blank, the HTTP request has ended,
9494
// so we can send a reply
9595
if (c == '\n' && current_line_is_blank) {
96-
// send a standard http response header
96+
// send a standard HTTP response header
9797
client.println("HTTP/1.1 200 OK");
9898
client.println("Content-Type: text/html");
9999
client.println();

examples/Ethernet/RegisteringServicesWithTxtRecord/RegisteringServicesWithTxtRecord.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ void setup()
4646

4747
// Initialize the mDNS library. You can now reach or ping this
4848
// Arduino via the host name "arduino.local", provided that your operating
49-
// system is mDNS/Bonjour-enabled (such as MacOS X).
49+
// system is mDNS/Bonjour-enabled (such as macOS).
5050
// Always call this before any other method!
5151
mdns.begin(Ethernet.localIP(), "arduino");
5252

5353
// Now let's register the service we're offering (a web service) via mDNS!
5454
// To do so, we call the addServiceRecord() method. The first argument is the
5555
// name of our service instance and its type, separated by a dot. In this
5656
// case, the service type is _http. There are many other service types, use
57-
// google to look up some common ones, but you can also invent your own
57+
// Google to look up some common ones, but you can also invent your own
5858
// service type, like _mycoolservice - As long as your clients know what to
5959
// look for, you're good to go.
6060
// The second argument is the port on which the service is running. This is
@@ -98,7 +98,7 @@ void loop()
9898
char lastLetter = '\0';
9999
char isPage2 = 0;
100100
if (client) {
101-
// an http request ends with a blank line
101+
// an HTTP request ends with a blank line
102102
bool current_line_is_blank = true;
103103
while (client.connected()) {
104104
if (client.available()) {
@@ -109,10 +109,10 @@ void loop()
109109
lastLetter = c;
110110

111111
// if we've gotten to the end of the line (received a newline
112-
// character) and the line is blank, the http request has ended,
112+
// character) and the line is blank, the HTTP request has ended,
113113
// so we can send a reply
114114
if (c == '\n' && current_line_is_blank) {
115-
// send a standard http response header
115+
// send a standard HTTP response header
116116
client.println("HTTP/1.1 200 OK");
117117
client.println("Content-Type: text/html");
118118
client.println();

examples/Ethernet/ResolvingHostNames/ResolvingHostNames.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// <http://www.gnu.org/licenses/>.
1919
//
2020

21-
// Illustrates how to resolve host names via MDNS (Multicast DNS)
21+
// Illustrates how to resolve host names via mDNS (Multicast DNS)
2222

2323

2424
#include <SPI.h>
@@ -47,7 +47,7 @@ void setup()
4747

4848
// Initialize the mDNS library. You can now reach or ping this
4949
// Arduino via the host name "arduino.local", provided that your operating
50-
// system is mDNS/Bonjour-enabled (such as MacOS X).
50+
// system is mDNS/Bonjour-enabled (such as macOS).
5151
// Always call this before any other method!
5252
mdns.begin(Ethernet.localIP(), "arduino");
5353

@@ -67,7 +67,7 @@ void loop()
6767
char hostName[512];
6868
int length = 0;
6969

70-
// read in a host name from the Arduino IDE's serial monitor.
70+
// read in a host name from the Arduino IDE's Serial Monitor.
7171
while (Serial.available()) {
7272
hostName[length] = Serial.read();
7373
length = (length+1) % 512;
@@ -118,4 +118,3 @@ void nameFound(const char* name, IPAddress ip)
118118
Serial.println("' timed out.");
119119
}
120120
}
121-

examples/WiFi/WiFiDiscoveringServices/WiFiDiscoveringServices.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
char ssid[] = "yourNetwork"; // your network SSID (name)
2929
char pass[] = "secretPassword"; // your network password
30-
int status = WL_IDLE_STATUS; // the Wifi radio's status
30+
int status = WL_IDLE_STATUS; // the WiFi radio's status
3131

3232
WiFiUDP udp;
3333
MDNS mdns(udp);
@@ -51,7 +51,7 @@ void setup()
5151
while (true);
5252
}
5353

54-
// attempt to connect to Wifi network:
54+
// attempt to connect to WiFi network:
5555
while ( status != WL_CONNECTED) {
5656
Serial.print("Attempting to connect to WPA SSID: ");
5757
Serial.println(ssid);
@@ -66,7 +66,7 @@ void setup()
6666

6767
// Initialize the mDNS library. You can now reach or ping this
6868
// Arduino via the host name "arduino.local", provided that your operating
69-
// system is mDNS/Bonjour-enabled (such as MacOS X).
69+
// system is mDNS/Bonjour-enabled (such as macOS).
7070
// Always call this before any other method!
7171
mdns.begin(WiFi.localIP(), "arduino");
7272

@@ -87,7 +87,7 @@ void loop()
8787
char serviceName[256];
8888
int length = 0;
8989

90-
// read in a service name from the Arduino IDE's serial monitor.
90+
// read in a service name from the Arduino IDE's Serial Monitor.
9191
while (Serial.available()) {
9292
serviceName[length] = Serial.read();
9393
length = (length+1) % 256;
@@ -176,4 +176,3 @@ void serviceFound(const char* type, MDNSServiceProtocol /*proto*/,
176176
}
177177
}
178178
}
179-

examples/WiFi/WiFiRegisteringServices/WiFiRegisteringServices.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
char ssid[] = "yourNetwork"; // your network SSID (name)
2929
char pass[] = "secretPassword"; // your network password
30-
int status = WL_IDLE_STATUS; // the Wifi radio's status
30+
int status = WL_IDLE_STATUS; // the WiFi radio's status
3131

3232
WiFiUDP udp;
3333
MDNS mdns(udp);
@@ -48,7 +48,7 @@ void setup()
4848
while (true);
4949
}
5050

51-
// attempt to connect to Wifi network:
51+
// attempt to connect to WiFi network:
5252
while ( status != WL_CONNECTED) {
5353
Serial.print("Attempting to connect to WPA SSID: ");
5454
Serial.println(ssid);
@@ -65,15 +65,15 @@ void setup()
6565

6666
// Initialize the mDNS library. You can now reach or ping this
6767
// Arduino via the host name "arduino.local", provided that your operating
68-
// system is mDNS/Bonjour-enabled (such as MacOS X).
68+
// system is mDNS/Bonjour-enabled (such as macOS).
6969
// Always call this before any other method!
7070
mdns.begin(WiFi.localIP(), "arduino");
7171

7272
// Now let's register the service we're offering (a web service) via Bonjour!
7373
// To do so, we call the addServiceRecord() method. The first argument is the
7474
// name of our service instance and its type, separated by a dot. In this
7575
// case, the service type is _http. There are many other service types, use
76-
// google to look up some common ones, but you can also invent your own
76+
// Google to look up some common ones, but you can also invent your own
7777
// service type, like _mycoolservice - As long as your clients know what to
7878
// look for, you're good to go.
7979
// The second argument is the port on which the service is running. This is
@@ -101,16 +101,16 @@ void loop()
101101
// in the browser when you connect.
102102
WiFiClient client = server.available();
103103
if (client) {
104-
// an http request ends with a blank line
104+
// an HTTP request ends with a blank line
105105
bool current_line_is_blank = true;
106106
while (client.connected()) {
107107
if (client.available()) {
108108
char c = client.read();
109109
// if we've gotten to the end of the line (received a newline
110-
// character) and the line is blank, the http request has ended,
110+
// character) and the line is blank, the HTTP request has ended,
111111
// so we can send a reply
112112
if (c == '\n' && current_line_is_blank) {
113-
// send a standard http response header
113+
// send a standard HTTP response header
114114
client.println("HTTP/1.1 200 OK");
115115
client.println("Content-Type: text/html");
116116
client.println();

examples/WiFi/WiFiRegisteringServicesWithTxtRecord/WiFiRegisteringServicesWithTxtRecord.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
char ssid[] = "yourNetwork"; // your network SSID (name)
2929
char pass[] = "secretPassword"; // your network password
30-
int status = WL_IDLE_STATUS; // the Wifi radio's status
30+
int status = WL_IDLE_STATUS; // the WiFi radio's status
3131

3232
WiFiUDP udp;
3333
MDNS mdns(udp);
@@ -48,7 +48,7 @@ void setup()
4848
while (true);
4949
}
5050

51-
// attempt to connect to Wifi network:
51+
// attempt to connect to WiFi network:
5252
while ( status != WL_CONNECTED) {
5353
Serial.print("Attempting to connect to WPA SSID: ");
5454
Serial.println(ssid);
@@ -65,15 +65,15 @@ void setup()
6565

6666
// Initialize the mDNS library. You can now reach or ping this
6767
// Arduino via the host name "arduino.local", provided that your operating
68-
// system is mDNS/Bonjour-enabled (such as MacOS X).
68+
// system is mDNS/Bonjour-enabled (such as macOS).
6969
// Always call this before any other method!
7070
mdns.begin(WiFi.localIP(), "arduino");
7171

7272
// Now let's register the service we're offering (a web service) via Bonjour!
7373
// To do so, we call the addServiceRecord() method. The first argument is the
7474
// name of our service instance and its type, separated by a dot. In this
7575
// case, the service type is _http. There are many other service types, use
76-
// google to look up some common ones, but you can also invent your own
76+
// Google to look up some common ones, but you can also invent your own
7777
// service type, like _mycoolservice - As long as your clients know what to
7878
// look for, you're good to go.
7979
// The second argument is the port on which the service is running. This is
@@ -117,7 +117,7 @@ void loop()
117117
char lastLetter = '\0';
118118
char isPage2 = 0;
119119
if (client) {
120-
// an http request ends with a blank line
120+
// an HTTP request ends with a blank line
121121
bool current_line_is_blank = true;
122122
while (client.connected()) {
123123
if (client.available()) {
@@ -128,10 +128,10 @@ void loop()
128128
lastLetter = c;
129129

130130
// if we've gotten to the end of the line (received a newline
131-
// character) and the line is blank, the http request has ended,
131+
// character) and the line is blank, the HTTP request has ended,
132132
// so we can send a reply
133133
if (c == '\n' && current_line_is_blank) {
134-
// send a standard http response header
134+
// send a standard HTTP response header
135135
client.println("HTTP/1.1 200 OK");
136136
client.println("Content-Type: text/html");
137137
client.println();

examples/WiFi/WiFiResolvingHostNames/WiFiResolvingHostNames.ino

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// <http://www.gnu.org/licenses/>.
1919
//
2020

21-
// Illustrates how to resolve host names via MDNS (Multicast DNS)
21+
// Illustrates how to resolve host names via mDNS (Multicast DNS)
2222

2323

2424
#include <SPI.h>
@@ -28,7 +28,7 @@
2828

2929
char ssid[] = "yourNetwork"; // your network SSID (name)
3030
char pass[] = "secretPassword"; // your network password
31-
int status = WL_IDLE_STATUS; // the Wifi radio's status
31+
int status = WL_IDLE_STATUS; // the WiFi radio's status
3232

3333
WiFiUDP udp;
3434
MDNS mdns(udp);
@@ -50,7 +50,7 @@ void setup()
5050
while (true);
5151
}
5252

53-
// attempt to connect to Wifi network:
53+
// attempt to connect to WiFi network:
5454
while ( status != WL_CONNECTED) {
5555
Serial.print("Attempting to connect to WPA SSID: ");
5656
Serial.println(ssid);
@@ -65,7 +65,7 @@ void setup()
6565

6666
// Initialize the mDNS library. You can now reach or ping this
6767
// Arduino via the host name "arduino.local", provided that your operating
68-
// system is mDNS/Bonjour-enabled (such as MacOS X).
68+
// system is mDNS/Bonjour-enabled (such as macOS).
6969
// Always call this before any other method!
7070
mdns.begin(WiFi.localIP(), "arduino");
7171

@@ -84,7 +84,7 @@ void loop()
8484
char hostName[512];
8585
int length = 0;
8686

87-
// read in a host name from the Arduino IDE's serial monitor.
87+
// read in a host name from the Arduino IDE's Serial Monitor.
8888
while (Serial.available()) {
8989
hostName[length] = Serial.read();
9090
length = (length+1) % 512;
@@ -135,4 +135,3 @@ void nameFound(const char* name, IPAddress ip)
135135
Serial.println("' timed out.");
136136
}
137137
}
138-

0 commit comments

Comments
 (0)