1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-18 07:52:14 +01:00

Merge pull request #3490 from facchinm/PR3123

Merging PR3123
This commit is contained in:
Martino Facchin 2015-07-09 13:45:19 +00:00
commit 27bc345ff8
3 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ endPacket KEYWORD2
parsePacket KEYWORD2 parsePacket KEYWORD2
remoteIP KEYWORD2 remoteIP KEYWORD2
remotePort KEYWORD2 remotePort KEYWORD2
getSocketNumber KEYWORD2
####################################### #######################################
# Constants (LITERAL1) # Constants (LITERAL1)

View File

@ -171,3 +171,7 @@ EthernetClient::operator bool() {
bool EthernetClient::operator==(const EthernetClient& rhs) { bool EthernetClient::operator==(const EthernetClient& rhs) {
return _sock == rhs._sock && _sock != MAX_SOCK_NUM && rhs._sock != MAX_SOCK_NUM; 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 bool value) { return bool() != value; }
virtual bool operator==(const EthernetClient&); virtual bool operator==(const EthernetClient&);
virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); }; virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); };
uint8_t getSocketNumber();
friend class EthernetServer; friend class EthernetServer;