mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
05aa240474
commit
afaaff1bd7
@ -381,10 +381,12 @@ FW_Read($$)
|
|||||||
|
|
||||||
# $op: 0=>Continuation, 1=>Text, 2=>Binary, 8=>Close, 9=>Ping, 10=>Pong
|
# $op: 0=>Continuation, 1=>Text, 2=>Binary, 8=>Close, 9=>Ping, 10=>Pong
|
||||||
if($op == 8) {
|
if($op == 8) {
|
||||||
|
# Close, Normal, empty mask. #104718
|
||||||
|
TcpServer_WriteBlocking($hash, pack("CCNn",0x88,0x82,0,1000));
|
||||||
TcpServer_Close($hash, 1);
|
TcpServer_Close($hash, 1);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} elsif($op == 9) {
|
} elsif($op == 9) { # Ping
|
||||||
return addToWritebuffer($hash, chr(0x8A).chr(0)); # Pong
|
return addToWritebuffer($hash, chr(0x8A).chr(0)); # Pong
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user