Skip to content

Commit f1f7728

Browse files
committed
move to websocket_lite
1 parent bdb638f commit f1f7728

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/WS_Lite.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ namespace SL {
4545
class WSListener;
4646
class WSClient;
4747
struct WSocketImpl;
48-
class WSocket {
48+
struct WSocket {
4949
std::shared_ptr<WSocketImpl> WSocketImpl_;
50-
public:
51-
WSocket(const std::shared_ptr<WSocketImpl>& ptr) : WSocketImpl_(ptr) {}
50+
5251
//can be used to compare two WSocket objects
5352
bool operator=(const WSocket& s) { return s.WSocketImpl_ == WSocketImpl_; }
5453
bool is_open();
@@ -57,6 +56,7 @@ namespace SL {
5756
bool is_v4();
5857
bool is_v6();
5958
bool is_loopback();
59+
operator bool() const { return WSocketImpl_.operator bool(); }
6060
friend WSListener;
6161
friend WSClient;
6262
};

0 commit comments

Comments
 (0)