Introduce WebSocket::terminate (todo: rename to close)

This commit is contained in:
Alex Hultman
2019-01-26 17:13:47 +01:00
parent 80322a5af7
commit ba10536f50
+6
View File
@@ -122,6 +122,12 @@ public:
webSocketContextData->closeHandler(this, code, message);
}
}
/* Simple, immediate close of the socket. Emits close event */
void terminate() {
/* This calls close event in context where it checks for isShuttingDown and either emits websocket close or not */
Super::close();
}
};
}