Clean-ups

This commit is contained in:
Alex Hultman
2020-06-04 13:19:25 +02:00
parent df14af9713
commit 9e3a75b19a
4 changed files with 23 additions and 123 deletions
-21
View File
@@ -157,23 +157,7 @@ public:
/* Emit upgrade handler */
if (behavior.upgrade) {
// a regular HttpResponse does not know about UserData or any of the Websocket upgrade procedure
// behavior.compression, (struct us_socket_context_t *) webSocketContext, httpContext, behavior.idleTimeout, behavior.open
// webSocketContext håller behavior - håller den även httpContext?
// int, void *, void *, int,
behavior.upgrade(res, req, (struct us_socket_context_t *) webSocketContext);
// if upgrade handler does not upgrade or end within the callback, lift a token?
// handle close here
} else {
/* Default handler upgrades to WebSocket */
std::string_view secWebSocketProtocol = req->getHeader("sec-websocket-protocol");
@@ -182,11 +166,6 @@ public:
res->template upgrade<UserData>({}, secWebSocketKey, secWebSocketProtocol, secWebSocketExtensions, (struct us_socket_context_t *) webSocketContext);
}
/* Emit open event and start the timeout */
if (behavior.open) {
//behavior.open(webSocket, req);
}
/* We are going to get uncorked by the Http get return */
/* We do not need to check for any close or shutdown here as we immediately return from get handler */