void nopoll_conn_close_ext ( noPollConn conn,
int  status,
const char *  reason,
int  reason_size 

Allows to close an opened noPollConn no matter its role (noPollRole).

connThe connection to close.
statusOptional status code to send to remote side. If status is < 0, no status code is sent.
reasonPointer to the content to be sent.
reason_sizeThe amount of bytes that should be used from content pointer.

References NOPOLL_CLOSE_FRAME, nopoll_conn_ref_count(), nopoll_conn_shutdown(), nopoll_conn_unref(), nopoll_free(), NOPOLL_LEVEL_DEBUG, nopoll_new, NOPOLL_ROLE_CLIENT, NOPOLL_ROLE_LISTENER, NOPOLL_ROLE_MAIN_LISTENER, NOPOLL_ROLE_UNKNOWN, and nopoll_true.

Referenced by nopoll_conn_close().