Saturday 22 April 2017

How to catch TCP socket transmission failures in Node.JS?

When I write data to a TCP socket in Node, which is not closed but the client on the other side is not connected anymore (because of network failure for example), how do I know?

The socket's error event doesn't fire in this case for me. If I'm right, TCP gives up sending data, if there is absolutely no ACK packets from the other side, doesn't it? Or am I misunderstanding something?



via KisGabo

No comments:

Post a Comment