diff options
author | Santiago Gimeno <santiago.gimeno@gmail.com> | 2019-04-28 12:55:03 +0200 |
---|---|---|
committer | Santiago Gimeno <santiago.gimeno@gmail.com> | 2019-08-19 23:41:15 +0200 |
commit | 958e85fbd842be06da8484305996f42149ba5039 (patch) | |
tree | 6e77368a5cc67cc9b80927b6afdf58f0be350374 /docs/src | |
parent | 040543eebf4983b1459a1e0e0e26dae68b80cc28 (diff) | |
download | libuv-958e85fbd842be06da8484305996f42149ba5039.tar.gz libuv-958e85fbd842be06da8484305996f42149ba5039.zip |
tcp: add uv_tcp_close_reset method
It resets a TCP connection by sending a RST packet. Due to some platform
inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls
is not allowed.
Fixes: https://github.com/libuv/libuv/issues/1991
PR-URL: https://github.com/libuv/libuv/pull/2425
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/tcp.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/src/tcp.rst b/docs/src/tcp.rst index d20a6362..bcb163ea 100644 --- a/docs/src/tcp.rst +++ b/docs/src/tcp.rst @@ -113,3 +113,13 @@ API mapping .. seealso:: The :c:type:`uv_stream_t` API functions also apply. + +.. c:function:: int uv_tcp_close_reset(uv_tcp_t* handle, uv_close_cb close_cb) + + Resets a TCP connection by sending a RST packet. This is accomplished by + setting the `SO_LINGER` socket option with a linger interval of zero and + then calling :c:func:`uv_close`. + Due to some platform inconsistencies, mixing of :c:func:`uv_shutdown` and + :c:func:`uv_tcp_close_reset` calls is not allowed. + + .. versionadded:: 1.32.0 |