TDI: connect event handler gets called thrice

Hi:

I am writing a TDI client. In the connect event handler, if I return
STATUS_CONNECTION_REFUSED, the handler gets called again, twice more! Is
there a way by which I can prevent the handler being called more than
once. Why does the transport driver call the handler again after it has
received a connection refusal?

KK

At 11:24 AM 4/24/2003, Keshab Koch wrote:

Hi:

I am writing a TDI client. In the connect event handler, if I return
STATUS_CONNECTION_REFUSED, the handler gets called again, twice more! Is
there a way by which I can prevent the handler being called more than
once. Why does the transport driver call the handler again after it has
received a connection refusal?

Because if the remote stack is a Microsoft one it has a ‘feature’
introduced to ‘speed-up’ Internet Explorer. It ignores a connection
refusal (ACK RST) and will send up to 3 SYNs in the hope that you might
change your mind. They introduced this little trick so that IE appeared
more robust than the NetScape browser in the case where the backlog queue
at the HTTP server was temporarily depleted. It’s very annoying, but I’m
afraid that you’ll just have to live with it.

Try a different stack at the remote end and you should see different behaviour.

Mark.