×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi Jerry,
So my question (to answer the consultant's question) is, is it possible to
automatically terminate the 'previous' connections in the socket server?
I'm not 100% sure that I follow this message... but the close() API is
what closes connections. When you're done with a given connect (by
that, I mean a socket that was returned by the accept() API at some
point earlier) call the close() API to terminate it.
I (like the consultant) find it a little strange that you'd leave a
connection open, but idle, for more than 30 minutes.
Normally, that sort of scenario only happens with long-running
interactive connections. For example, TELNET (or Telnet 3270 "tn3270"
or Telnet 5250 "tn5250") opens up a terminal emulator that's connected
to it's host by a TCP socket. When the user sits idle at the keyboard
for 30 minutes, you could have a connection that's idle for 30
minutes... but that generally only happens an an interactive scenario,
because you're waiting for a person.
A program-to-program connection would not normally be idle like this,
since computers don't typically stop and do nothing for 30 minutes
straight :)
Of course, none of us can tell you what the "right" solution to your
problem is -- that's a business issue, and you're the person who is
designing and implementing the solution. So maybe a long-running
single TCP connection is the right choice for you. In that case, you'll
need to set your VPN connection to never time-out.
But in most cases, TCP software doesn't keep one long static connection.
It's disconnected until it needs something from the other host, then it
connects, and only stays connected while it needs to be... something
that sits idle for 30 minutes would be an error in this paradigm.
As an Amazon Associate we earn from qualifying purchases.