6 ms·
If the socket is terminated mid-command (thus emitting 'close'), one would want the process to be killed. Also, the socket doesn't know that no more transmissio
by wpears 13y ago
If the socket is terminated mid-command (thus emitting 'close'), one would want the process to be killed. Also, the socket doesn't know that no more transmission is required just because one particular stream is over. That is why close is called manually on the socket after the stream emits a 'close'.
This all provided you use a streaming web socket module like https://github.com/maxogden/websocket-stream https://github.com/maxogden/websocket-stream