Function closeReset

Synopsis

#include <src/uvw/tcp.h>

void closeReset()

Description

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 close.
Due to some platform inconsistencies, mixing of shutdown and closeReset calls is not allowed.

A CloseEvent event is emitted when the connection has been reset.
An ErrorEvent event is emitted in case of errors.

Source

Lines 99-101 in src/uvw/tcp.cpp. Line 225 in src/uvw/tcp.h.

UVW_INLINE void TCPHandle::closeReset() {
    invoke(&uv_tcp_close_reset, get(), &this->closeCallback);
}





Add Discussion as Guest

Log in