c++ - winsock , how to send an RST,ACK or RST packet -


i have winsock server uses wsaeconnreset, error code 10054 event. can perform using exit() function have relaunch application.

the question how kill established connection , send rst packet server processes take place when use exit() not using it. app has keep running has kill connection rst packet. want imitate ctrl+c, or exit() or terminate() process rst packet sent.

i tried so_linger socket options in combination socketclose(); , shutdown(); not cause wsaeconnreset event.

i tried so_linger socket options

you need set 'on' 0 timeout.

in combination socketclose();

correct.

and shutdown();

incorrect. remove that. sends fin.

but not cause wsaeconnreset event.

because of shutdown(). remove that.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -