net: add ability to reset a tcp socket
make it possible to forcibly rest a tcp socket:
-
add a new method
Socket.prototype.resetAndDestroy
-
add a new private method
Socket.prototype._reset
-
add a new flag
resetAndClosing
to make_destroy
calls the_reset
instead of close while destroying a Socket. -
add new methods
TCPWrap::Reset
to be a wrap ofuv_tcp_close_reset
-
change
HandleWrap::state_
from private to protected. This is essential for keeping the same behaviour betweenTCPWrap::Reset
andHandleWrap::Close
-
add test cases for the new method