We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdb638f commit f1f7728Copy full SHA for f1f7728
include/WS_Lite.h
@@ -45,10 +45,9 @@ namespace SL {
45
class WSListener;
46
class WSClient;
47
struct WSocketImpl;
48
- class WSocket {
+ struct WSocket {
49
std::shared_ptr<WSocketImpl> WSocketImpl_;
50
- public:
51
- WSocket(const std::shared_ptr<WSocketImpl>& ptr) : WSocketImpl_(ptr) {}
+
52
//can be used to compare two WSocket objects
53
bool operator=(const WSocket& s) { return s.WSocketImpl_ == WSocketImpl_; }
54
bool is_open();
@@ -57,6 +56,7 @@ namespace SL {
57
56
bool is_v4();
58
bool is_v6();
59
bool is_loopback();
+ operator bool() const { return WSocketImpl_.operator bool(); }
60
friend WSListener;
61
friend WSClient;
62
};
0 commit comments