Skip to content

Commit

Permalink
Merge pull request #140 from JAndrassy/wifis3_server_bool
Browse files Browse the repository at this point in the history
undefined
  • Loading branch information
aentinger authored Dec 13, 2023
2 parents 7788752 + cdb22f2 commit 7061327
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/WiFiS3/src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ void WiFiServer::end() {
}
}

WiFiServer::operator bool()
{
return (_sock != -1);
}

bool WiFiServer::operator==(const WiFiServer& whs)
{
return _sock == whs._sock;
}
}
1 change: 1 addition & 0 deletions libraries/WiFiS3/src/WiFiServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class WiFiServer : public Server {
virtual size_t write(uint8_t);
virtual size_t write(const uint8_t *buf, size_t size);
void end();
explicit operator bool();
virtual bool operator==(const WiFiServer&);
virtual bool operator!=(const WiFiServer& whs)
{
Expand Down

0 comments on commit 7061327

Please sign in to comment.