Websocket library no longer considers a non-data frame to be "read", instead handles them fully internally
This commit is contained in:
parent
afcbbc8e74
commit
03a79ab337
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue