socket closed message

Posted on 2003-03-10
Medium Priority
Last Modified: 2013-12-03
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
Question by:marvinm
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 49

Expert Comment

ID: 8105450
>>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


Author Comment

ID: 8110763
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?
LVL 49

Expert Comment

ID: 8113175
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

Accepted Solution

oferh earned 1000 total points
ID: 8119773
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.

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question