J
jgretz
Background:
My program connects to an external web service. Normally this is done
over a high speed lan connection, but in the event that the lan is
down, it supports using 1 or many dial up connections to connect to
the web as well. As a side note, the machine is on a network, so the
lan will always appear to be up, it is the backbone to the external
world that could go down. My program uses the Ping class to determine
if we currently have an available connection, if so it uses it, if
not, it goes through a list of dial up connections and attempts to
dial them. if a dial up connection is successful it will hold onto
that connection for 3 minutes of inactivity before disconnecting.
Problem:
Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).
Any help would be appreciated.
Thanks,
My program connects to an external web service. Normally this is done
over a high speed lan connection, but in the event that the lan is
down, it supports using 1 or many dial up connections to connect to
the web as well. As a side note, the machine is on a network, so the
lan will always appear to be up, it is the backbone to the external
world that could go down. My program uses the Ping class to determine
if we currently have an available connection, if so it uses it, if
not, it goes through a list of dial up connections and attempts to
dial them. if a dial up connection is successful it will hold onto
that connection for 3 minutes of inactivity before disconnecting.
Problem:
Lets say I have a 5 minute long series of processes. When the first
process executes the lan is down, so we connect to the dial up
connection, process the request, and everything is fine. Next, the lan
comes back up within the 3 minutes time out, so we now effectively
have two live connections to the web. So now I get the second request,
is there any way programatically I can force the packets to route over
the lan and not the dial up? (I know there are outside ways to do this
with metrics, I am looking for code).
Any help would be appreciated.
Thanks,