socket closed message

We have a win32 client application connected to a linux server with tcp/ip socket over a VPN connection.  Occasionally the network will have a hiccup and our application receives a FD_CLOSE message.  Sometimes a telnet connection will not disconnect while our applictions socket will get closed.  I have read that there is not a way to set the underlying socket timeout, but was wondering if there is a way to make our application a little more robust and withstand the occational network problems that arise similar to the telnet sessions.  Our application messaging is very sensitive however and demands that all messages be sent/received in the correct order.  
Thank You
-Marvin
LVL 1
marvinmAsked:
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.

DanRollinsCommented:
>>Sometimes a telnet connection will not disconnect while our applictions socket will get closed.
>>...withstand the occational network problems that arise similar to the telnet sessions.

I don't understand these parts of your question.  Could you elaborate?
-- Dan

0
marvinmAuthor Commented:
our application receives an FD_CLOSE message indicating that its connection is lost.  A telnet session may (more often than not) continue to function (it may be slow and jerky, but  
does not lose connection with server.  Is telnet less sensitive somehow?
0
DanRollinsCommented:
telnet is a separate application program, is it not?  It could certainly try and retry to reconnect when connection is lost, might it not?  Perhaps that is what you should do when you receive and FD_CLOSE unexpectedly from the server.

-- Dan
0
oferhCommented:
to make your application less sensitive to the network you need to make a retry mechanizem that, if it detects a network problem it will keep the messages in a queue.
try to reconnect to the server and resend them
when the connection is resumed.
0

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
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
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.