× 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.



A week or so ago I posted a thread about a Socket server opening multiple
remote ports on the same local port. What is happening is that our Cisco
VPN log shows the peer dropping the connection after approximately two
hours, which is causing the socket server to establish a new connection.
After bringing this to the attention of the network person working on the
client side who is a consultant (and working in a unix envrionment), I
received the response that follows:

<Begin Reponse>
There is a timer for the VPN called idle-timeout which currently is set to
30 mins. If there is no activity over the tunnel for the defined period
(connection is idle), the Lan to Lan tunnel is terminated. As soon as data
is available for transport, the LAN to LAN tunnel comes up automatically
and lets the traffic through.
It is possible to set this timer to *0* so the tunnel does not terminate
even though its idle but the security policy on the LAN to LAN in general
is set to renegotiate every 8 hours and it only renegotiates if there is
data passing over the tunnel. If there is no traffic, then the LAN to LAN
tunnel is torn down. Assuming that I change the idle-timeout to 0 and
traffic is sent only every 9 hours, the this will bring the tunnel down 4
times a day which would translate to 4 different connection on the
server's end. Now my question is, why is the previous connection not being
terminated automatically? Is there a setting in the application that can
be changed so that it tears the connection down if idle for a certain
period of time?

I am not familiar with how the actual application works nor am I aware of
any limitation as far as how the connection should be established but as
far as the LAN to LAN is concern, it is behaving as expected. However, I
am willing to work with the application group to come up with the settings
that would work best for both sides. Let me know your thoughts.
<End Response>

So my question (to answer the consultant's question) is, is it possible to
automatically terminate the 'previous' connections in the socket server?

Below is an example of what I see using netstat *cnn, and note that
remote port values are different but the local port is the same for each
connection.

Work with TCP/IP Connection Status
System:
TCLINIC2
Type options, press Enter.
3=Enable debug 4=End 5=Display details 6=Disable debug
8=Display jobs

Remote Remote Local
Opt Address Port Port Idle Time State

10.129.32.132 43590 3471 000:33:30 Established
10.129.32.132 53136 3471 004:56:11 Established
10.129.32.132 64691 3471 002:44:51 Established

Or should I be asking if the following (abbreviated) processes (within my
server program) are correct:

When the program starts it sets the socket server to be reusable.
Then it Selects the socket connection and Accepts it
Then it sets socket client to be reusable
Then it sets socket client to non-blocked mode
Then it attempts to read data (in a read/write loop) and at this point the
connection has been established but no data has been received so the
program exits the loop and returns to the Select where it waits until
another (new) connection is accepted.

So I think my question is how do I terminate the connection after I
attempt to read data and the return value indicating the number of bytes
is -1, before it returns to the Select? Is this a practical solution or am
I missing something significant in the bigger picture.

Regards, Jerry

Gerald Kern - MIS Project Leader
Lotus Notes/Domino Administrator
IBM Certified RPG IV Developer
The Toledo Clinic, Inc.
4235 Secor Road
Toledo, OH 43623-4299
Phone 419-479-5535
gkern@xxxxxxxxxxxxxxxx


This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please inform the
sender by reply e-mail and destroy this and all copies of this message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.