From cb29406819a13fb7dbe9beffc361f3b35dbfed11 Mon Sep 17 00:00:00 2001 From: Aberto Panu Date: Mon, 30 Mar 2015 10:31:27 +0200 Subject: [PATCH 1/2] Update EthernetClient.h Added getsocketnumber() function --- libraries/Ethernet/src/EthernetClient.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/Ethernet/src/EthernetClient.h b/libraries/Ethernet/src/EthernetClient.h index 16e2500bc37..bcc32500abb 100644 --- a/libraries/Ethernet/src/EthernetClient.h +++ b/libraries/Ethernet/src/EthernetClient.h @@ -28,6 +28,7 @@ class EthernetClient : public Client { virtual bool operator!=(const bool value) { return bool() != value; } virtual bool operator==(const EthernetClient&); virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); }; + uint8_t getsocketnumber(); friend class EthernetServer; From b2fc70d434502cb05dedf2bec14bf2d8f1139ca0 Mon Sep 17 00:00:00 2001 From: Aberto Panu Date: Mon, 30 Mar 2015 10:32:24 +0200 Subject: [PATCH 2/2] Update EthernetClient.cpp --- libraries/Ethernet/src/EthernetClient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/Ethernet/src/EthernetClient.cpp b/libraries/Ethernet/src/EthernetClient.cpp index a592bfdc956..ff5f013cf88 100644 --- a/libraries/Ethernet/src/EthernetClient.cpp +++ b/libraries/Ethernet/src/EthernetClient.cpp @@ -166,3 +166,7 @@ EthernetClient::operator bool() { bool EthernetClient::operator==(const EthernetClient& rhs) { return _sock == rhs._sock && _sock != MAX_SOCK_NUM && rhs._sock != MAX_SOCK_NUM; } + +uint8_t EthernetClient::getsocketnumber () { + return _sock; +}