2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 18:56:03 +00:00

01_FHEMWEB.pm: add websocket close (Forum #104718)

git-svn-id: https://svn.fhem.de/fhem/trunk@20398 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-10-23 09:30:40 +00:00
parent 05aa240474
commit afaaff1bd7

View File

@ -381,10 +381,12 @@ FW_Read($$)
# $op: 0=>Continuation, 1=>Text, 2=>Binary, 8=>Close, 9=>Ping, 10=>Pong
if($op == 8) {
# Close, Normal, empty mask. #104718
TcpServer_WriteBlocking($hash, pack("CCNn",0x88,0x82,0,1000));
TcpServer_Close($hash, 1);
return;
} elsif($op == 9) {
} elsif($op == 9) { # Ping
return addToWritebuffer($hash, chr(0x8A).chr(0)); # Pong
}