1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

add localPort to EthernetClient, simplify operator==

This commit is contained in:
ntruchsess
2013-11-27 10:26:11 +01:00
parent ca37de4ba4
commit 937bce1a0b
4 changed files with 9 additions and 11 deletions

View File

@ -72,8 +72,6 @@ void loop() {
for (byte i=0;i<4;i++) {
if (clients[i]!=client) {
clients[i] = client;
Serial.print("found slot: ");
Serial.println(i);
break;
}
}
@ -81,7 +79,7 @@ void loop() {
// clead out the input buffer:
client.flush();
Serial.println("We have a new client");
client.println("Hello, client!");
client.println("Hello, client!");
client.print("your IP: ");
client.println(client.remoteIP());
client.print("your port: ");
@ -105,7 +103,6 @@ void loop() {
for (byte i=0;i<4;i++) {
if (!(clients[i].connected())) {
clients[i].stop();
~clients[i];
clients[i]=EthernetClient();
}
}