views:

20

answers:

1

When a server receives a WSAECONNABORTED from a device (coming in from a send()), should a connection be re-established and data re-sent or should the server bail out and drop the connection?

Thanks.

+2  A: 

The connection is already dropped, there is nothing to bail from. And there is nothing you can re-send on. Drop all state associated with connection, compensate any incomplete operation, return all resources to their pools, prepare for a new connection from a client.

Remus Rusanu
Ok, I understand, thanks.Another question then - is there a way to minimize this error or avoid it completely? It appears some clients will not re-establish a connection after this error, so this aborts the conversation completely.
dennisV
How to minimize this or how to make the client reconnect is completely dependent on the code and application behavior.
Remus Rusanu