Websocket library no longer considers a non-data frame to be "read", instead handles them fully internally

This commit is contained in:
Thulinma 2018-08-13 09:37:00 +02:00
parent afcbbc8e74
commit 03a79ab337

View file

@ -118,17 +118,21 @@ namespace HTTP{
switch (frameType){
case 0x0://Continuation, should not happen
WARN_MSG("Received unknown websocket frame - ignoring");
return false;
break;
case 0x8://Connection close
HIGH_MSG("Websocket close received");
C.close();
return false;
break;
case 0x9://Ping
HIGH_MSG("Websocket ping received");
sendFrame(data, data.size(), 0xA);//send pong
return false;
break;
case 0xA://Pong
HIGH_MSG("Websocket pong received");
return false;
break;
}
return true;