0
votes

My client app gets intermittent winsock errors (10060, 10053) against one particular server we interface with. I have it re-trying the request that failed, but sometimes it fails repeatedly, and I give up after 5 re-tries. Would it be likely to help at all if I closed the socket and created a new one? (I know nothing about the server-side.)

2
IMHO it doesn't do anyone any good to quote JUST the error numbers, I don't know them off by heart and I often can't be bothered to look them up for you. Why not start by looking up the errors in <winerror.h> and giving the #define name rather than simply the number. At least then people would have some idea of what errors your program is encountering.Len Holgate

2 Answers

0
votes

Ok, so the errors that you're getting are:

10060 - WSAETIMEDOUT
10053 - WSAECONNABORTED

When do you get them? What are you doing at the time?

You get a WSAECONNABORTED when the remote end of the connection, or possibly an intermediary router, resets the connection and sends an RST. This could simply be the remote end issuing a non lingering close or it could be the remote end aborting or crashing.

You can't continue doing anything with a connection that has had a WSAECONNABORTED on it as the connection has been aborted and is no more; it is a dead connection, it has passed on...

Context matters immensely as to why you might get a WSAETIMEDOUT exception and the context will dictate if retrying is sensible or not.

0
votes

One thing I would try is- do tracert to your server.

Often when someone is connected through VPN; you may see this error because your local and remote ip addresses overlap.

e.g. if your local ipaddress range is 192.168.1.xxx and vpn remote range is also 192.168.1.xxx you will also see this error.

sharrajesh