Add EthernetClient getSocketNumber() function

This commit is contained in:
Aberto Panu 2015-05-12 12:03:04 +02:00 committed by Martino Facchin
parent 2f3914eb97
commit c5f0815f27
2 changed files with 5 additions and 0 deletions

View File

@ -171,3 +171,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;
+}

View File

@ -28,6 +28,7 @@ public:
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;