TCP/IP Error 10053 Sending Data using Sockets.

I have an application that uses Windows Sockets to communicate to a network device( Lantronix Print Server ).  I am currently sending approx. 200 bytes of data to this device every 30 seconds - the throughput of data is small.  I am having an intermittent problem where my application incurs an error on the TCP/IP Send() function. The error code is 10053(WSAECONNABORTED) retrieved by WSAGetLastError().  The explanation of this error is: Software caused connection abort.  Why does this error occur and under what conditions?  What baffles me is that I have had this app working for months and I am just starting to get this problem.  I checked if it was a network load issue - don't think so?  Back to the original question:  Under what conditions does this error occur and why?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I dont have access to the drivers for your tcpip stack, and this
is where you'll have to look if you really need to know all the
reasons that this can happen.

The most traditional meaning of this error is that the remote
sockets queue is full and it cant accept anymore connections.
You said you get the error on send() though so I'd look for
resource depletion issues.   Can you code for an immediate re-
connect and re send() of your data ?  The attempted reconnect
might shed some light.
You can check a number of things that might help to identify the reason(s) for the failure.  Basically, your connection timed out waiting for an ACK, or a FIN packet was not ACK'd, etc.

1.  Ping the remote host.  If it doesn't respond, it might be offline, or a network problem along the way.  If it does respond, reconnect.
2.  Ping your local router address.
3.  Ping another host on the destination network.  This will verify that your routing is working.
4.  Try a traceroute to the host to which your were connected.

Notes about cancelled connections.
1.  Cancellation of blocking socket calls can leave a socket in an indeterminate state.  The accept and select functions are the only exceptions noted, so cancelling them should be ok.  Cancellation of other blocking functions may compromise the integrity of a data stream.  If this happens, subsequent function calls will fail with WSAECONNABORTED.
After a cancellation occurs, the only network functions that are guaranteed to work are accept, select, and closesocket.  closesocket is only guaranteed to work if you abort the connection (set timeout to 0 with setsockopt SO_LINGER), rather than attempt a graceful close.
2.  When you get this error, call closesocket and reconnect.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wzhxxjAuthor Commented:
Definitely a resource depletion issue - looks like the connection on the other end of the device was loose and the data on the socket queue was not being removed.  Thanks for your help.
wzhxxjAuthor Commented:
The comment that Scotch provided led me to the answer.  Who gets the points??

If you want me to get the points you have to reject the one
answer and have me answer after you re-open it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.