Skip to content

Commit 60a2ced

Browse files
committed
added comparison operator to wifiSSLClient class
1 parent 92f4541 commit 60a2ced

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

libraries/WiFiS3/src/WiFiSSLClient.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ uint8_t WiFiSSLClient::connected() {
219219
}
220220
return rv;
221221
}
222+
bool WiFiSSLClient::operator==(const WiFiSSLClient& whs)
223+
{
224+
return _sock == whs._sock;
225+
}
222226

223227
/* -------------------------------------------------------------------------- */
224228
IPAddress WiFiSSLClient::remoteIP() {

libraries/WiFiS3/src/WiFiSSLClient.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ class WiFiSSLClient : public WiFiClient {
4646
virtual operator bool() {
4747
return _sock != -1;
4848
}
49-
49+
virtual bool operator==(const WiFiSSLClient&);
50+
virtual bool operator!=(const WiFiSSLClient& whs)
51+
{
52+
return !this->operator==(whs);
53+
};
5054
virtual IPAddress remoteIP();
5155
virtual uint16_t remotePort();
5256

0 commit comments

Comments
 (0)