Some clean-ups

This commit is contained in:
Alex Hultman
2018-11-21 23:19:20 +01:00
parent 91620c6c42
commit 519c1f5b60
5 changed files with 43 additions and 73 deletions
+6 -7
View File
@@ -11,10 +11,16 @@ namespace uWS {
template <bool SSL, bool isServer>
struct WebSocket : AsyncSocket<SSL> {
template <bool> friend struct TemplatedApp;
private:
typedef AsyncSocket<SSL> Super;
void init() {
new (us_socket_ext((us_socket *) this)) WebSocketData;
}
public:
// this function need clean-ups and perf. fixes
void send(std::string_view message, uWS::OpCode opCode) {
// if corkAllocate(size) then corkFree(unused)
@@ -54,13 +60,6 @@ public:
// why should we fin here?
//us_socket_shutdown((us_socket *) this);
}
// absolutely not public!
void init() {
// construct us
new (us_socket_ext((us_socket *) this)) WebSocketData;
}
};
}