Yonle on Nostr: WebSocket: Terminating connections. .close() VS .terminate() .close(): - You say ...
WebSocket: Terminating connections.
.close() VS .terminate()
.close():
- You say "FIN" into server, wait for acknowledge response.
- The server says bye, Then proceeds closing TCP connection
.terminate():
- Not saying FIN to server but immediately destroy the TCP connection
- In other end, The server may not even know that you are disconnected.
- It's basically kicking out your friend from your house, Then slamming the door in front of their face.
Published at
2024-06-07 07:36:39Event JSON
{
"id": "800aebecc3b3f465d4874b3850807b5748499d7940256d0ba16d620b1cfc35ca",
"pubkey": "347a2370900d19b4e4756221594e8bda706ae5c785de09e59e4605f91a03f49c",
"created_at": 1717738599,
"kind": 1,
"tags": [],
"content": "WebSocket: Terminating connections.\n.close() VS .terminate()\n\n.close():\n- You say \"FIN\" into server, wait for acknowledge response.\n- The server says bye, Then proceeds closing TCP connection\n\n.terminate():\n- Not saying FIN to server but immediately destroy the TCP connection\n- In other end, The server may not even know that you are disconnected.\n- It's basically kicking out your friend from your house, Then slamming the door in front of their face.",
"sig": "194fb2de2b0883f07267b77ed8555c762e710e3ef767198bb9d65e927ffdb6aa40e15c7cc5e38685f729e48b368a82a3e26df80a50bc43d4a26e1d4ced8743ae"
}