Skip to content

Commit c5f0815

Browse files
bigjohnsonfacchinm
authored andcommitted
Add EthernetClient getSocketNumber() function
1 parent 2f3914e commit c5f0815

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libraries/Ethernet/src/EthernetClient.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,7 @@ EthernetClient::operator bool() {
171171
bool EthernetClient::operator==(const EthernetClient& rhs) {
172172
return _sock == rhs._sock && _sock != MAX_SOCK_NUM && rhs._sock != MAX_SOCK_NUM;
173173
}
174+
175+
+uint8_t EthernetClient::getSocketNumber () {
176+
+ return _sock;
177+
+}

libraries/Ethernet/src/EthernetClient.h

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class EthernetClient : public Client {
2828
virtual bool operator!=(const bool value) { return bool() != value; }
2929
virtual bool operator==(const EthernetClient&);
3030
virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); };
31+
uint8_t getSocketNumber();
3132

3233
friend class EthernetServer;
3334

0 commit comments

Comments
 (0)