From: John Simpson on

"David" <NoWhere(a)earthlink.net> wrote in message
news:uvS9EAL8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
> Ralph:
> Thanks for response.
>
> "Hang" was a poor choice of wording on my part. App still functions
> just isn't receiving data. Better choice wording should of been
> "have auto reconnect back to server"
>
> From this point it
>> should be an easy step to design a recovery mechanism.
>
> Above statement doesn't help a lot. For example: how do I detect that
> connection was lost so I can begin recovery?
>
> Any ideas?
>
>
> "ralph" <nt_consulting64(a)yahoo.net> wrote in message
> news:li9hu590v6ihfg9mmrmgflhqjio6rilh4a(a)4ax.com...
>> On Mon, 10 May 2010 18:17:16 -0400, "David" <NoWhere(a)earthlink.net>
>> wrote:
>>
>>>I have a program (I'm the client) that connects to a server.
>>>The server reboots everyday (out of my control) at 4:45:00 for three
>>>seconds.
>>>
>>>At this time my program hangs (stops receiving data) and does Not
>>>continue after the three second interruption.
>>>
>>>Is there a solution to reestablish or maintain this connection other
>>>than:
>>>
>>>1) manually reconnecting, or
>>>2) setting up a time tracking program to have XP close and then
>>> re-start my program -- (can see problems with this if the
>>> server changes reboot time)
>>>
>>>Thanks
>>>David
>>>
>>>
>>
>> Difficult to answer without more information, but generally there is a
>> solution.
>>
>> Stepping back a bit, it is a poor design that allows a program to
>> "hang" just because it has lost connection with some resource. At the
>> very least you should have simple error handling in place to detect
>> this and allow the program to close gracefully. From this point it
>> should be an easy step to design a recovery mechanism.
>>
>> -ralph
>>
>>

David,

do a retval = dir(some-known-file-on-server). If not len(retval), server is
down.

Maybe you can do a do loop until len(retval) is true.

John


__________ Information from ESET Smart Security, version of virus signature database 5106 (20100511) __________

The message was checked by ESET Smart Security.

http://www.eset.com



From: David on
Mr Simpson:

I tried puttiing KeepAliveTime in registry-- did Not work.
Went down today at the usual time.

FWIW I have no access to the server.
All I'm doing is linking to a vendors server (as a client) and receiving
data via UDP.

Re: My App (Client side).
Not sure what more I can do to redesign.

Have the vendors ActiveX dll which contains only three events:
1) data receive;
2) timestamp; and
3) error.
I've coded against all three.

As previously stated error event does Not trigger when server stops sending
data (rebooted).
Only way to tell server went down is look at my Caption (where I display the
timestamp).
Every day at exactly 4:45:33 seconds my App stops receiving data --
timestamp has stopped.

Closing my App, and then restarting it (my App)
relinks to server and everything is OK for another 24 hours.



"John Simpson" <jasimp(a)earthlink.net> wrote in message
news:utB46hU8KHA.1424(a)TK2MSFTNGP04.phx.gbl...
>
> "David" <NoWhere(a)earthlink.net> wrote in message
> news:uvS9EAL8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
>> Ralph:
>> Thanks for response.
>>
>> "Hang" was a poor choice of wording on my part. App still functions
>> just isn't receiving data. Better choice wording should of been
>> "have auto reconnect back to server"
>>
>> From this point it
>>> should be an easy step to design a recovery mechanism.
>>
>> Above statement doesn't help a lot. For example: how do I detect that
>> connection was lost so I can begin recovery?
>>
>> Any ideas?
>>
>>
>> "ralph" <nt_consulting64(a)yahoo.net> wrote in message
>> news:li9hu590v6ihfg9mmrmgflhqjio6rilh4a(a)4ax.com...
>>> On Mon, 10 May 2010 18:17:16 -0400, "David" <NoWhere(a)earthlink.net>
>>> wrote:
>>>
>>>>I have a program (I'm the client) that connects to a server.
>>>>The server reboots everyday (out of my control) at 4:45:00 for three
>>>>seconds.
>>>>
>>>>At this time my program hangs (stops receiving data) and does Not
>>>>continue after the three second interruption.
>>>>
>>>>Is there a solution to reestablish or maintain this connection other
>>>>than:
>>>>
>>>>1) manually reconnecting, or
>>>>2) setting up a time tracking program to have XP close and then
>>>> re-start my program -- (can see problems with this if the
>>>> server changes reboot time)
>>>>
>>>>Thanks
>>>>David
>>>>
>>>>
>>>
>>> Difficult to answer without more information, but generally there is a
>>> solution.
>>>
>>> Stepping back a bit, it is a poor design that allows a program to
>>> "hang" just because it has lost connection with some resource. At the
>>> very least you should have simple error handling in place to detect
>>> this and allow the program to close gracefully. From this point it
>>> should be an easy step to design a recovery mechanism.
>>>
>>> -ralph
>>>
>>>
>
> David,
>
> do a retval = dir(some-known-file-on-server). If not len(retval), server
> is down.
>
> Maybe you can do a do loop until len(retval) is true.
>
> John
>
>
> __________ Information from ESET Smart Security, version of virus
> signature database 5106 (20100511) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>


From: Henning on
And how on earth can UDP break with a connection-error?

/Henning

"David" <NoWhere(a)earthlink.net> skrev i meddelandet
news:uTiBUtV8KHA.1760(a)TK2MSFTNGP04.phx.gbl...
> Mr Simpson:
>
> I tried puttiing KeepAliveTime in registry-- did Not work.
> Went down today at the usual time.
>
> FWIW I have no access to the server.
> All I'm doing is linking to a vendors server (as a client) and receiving
> data via UDP.
>
> Re: My App (Client side).
> Not sure what more I can do to redesign.
>
> Have the vendors ActiveX dll which contains only three events:
> 1) data receive;
> 2) timestamp; and
> 3) error.
> I've coded against all three.
>
> As previously stated error event does Not trigger when server stops
> sending data (rebooted).
> Only way to tell server went down is look at my Caption (where I display
> the timestamp).
> Every day at exactly 4:45:33 seconds my App stops receiving data --
> timestamp has stopped.
>
> Closing my App, and then restarting it (my App)
> relinks to server and everything is OK for another 24 hours.
>
>
>
> "John Simpson" <jasimp(a)earthlink.net> wrote in message
> news:utB46hU8KHA.1424(a)TK2MSFTNGP04.phx.gbl...
>>
>> "David" <NoWhere(a)earthlink.net> wrote in message
>> news:uvS9EAL8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
>>> Ralph:
>>> Thanks for response.
>>>
>>> "Hang" was a poor choice of wording on my part. App still functions
>>> just isn't receiving data. Better choice wording should of been
>>> "have auto reconnect back to server"
>>>
>>> From this point it
>>>> should be an easy step to design a recovery mechanism.
>>>
>>> Above statement doesn't help a lot. For example: how do I detect that
>>> connection was lost so I can begin recovery?
>>>
>>> Any ideas?
>>>
>>>
>>> "ralph" <nt_consulting64(a)yahoo.net> wrote in message
>>> news:li9hu590v6ihfg9mmrmgflhqjio6rilh4a(a)4ax.com...
>>>> On Mon, 10 May 2010 18:17:16 -0400, "David" <NoWhere(a)earthlink.net>
>>>> wrote:
>>>>
>>>>>I have a program (I'm the client) that connects to a server.
>>>>>The server reboots everyday (out of my control) at 4:45:00 for three
>>>>>seconds.
>>>>>
>>>>>At this time my program hangs (stops receiving data) and does Not
>>>>>continue after the three second interruption.
>>>>>
>>>>>Is there a solution to reestablish or maintain this connection other
>>>>>than:
>>>>>
>>>>>1) manually reconnecting, or
>>>>>2) setting up a time tracking program to have XP close and then
>>>>> re-start my program -- (can see problems with this if the
>>>>> server changes reboot time)
>>>>>
>>>>>Thanks
>>>>>David
>>>>>
>>>>>
>>>>
>>>> Difficult to answer without more information, but generally there is a
>>>> solution.
>>>>
>>>> Stepping back a bit, it is a poor design that allows a program to
>>>> "hang" just because it has lost connection with some resource. At the
>>>> very least you should have simple error handling in place to detect
>>>> this and allow the program to close gracefully. From this point it
>>>> should be an easy step to design a recovery mechanism.
>>>>
>>>> -ralph
>>>>
>>>>
>>
>> David,
>>
>> do a retval = dir(some-known-file-on-server). If not len(retval), server
>> is down.
>>
>> Maybe you can do a do loop until len(retval) is true.
>>
>> John
>>
>>
>> __________ Information from ESET Smart Security, version of virus
>> signature database 5106 (20100511) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>
>


From: David on
Henning:

Didn't say it could. Just giving facts.

"Henning" <computer_hero(a)coldmail.com> wrote in message
news:%231A7m$V8KHA.2248(a)TK2MSFTNGP05.phx.gbl...
> And how on earth can UDP break with a connection-error?
>
> /Henning
>
> "David" <NoWhere(a)earthlink.net> skrev i meddelandet
> news:uTiBUtV8KHA.1760(a)TK2MSFTNGP04.phx.gbl...
>> Mr Simpson:
>>
>> I tried puttiing KeepAliveTime in registry-- did Not work.
>> Went down today at the usual time.
>>
>> FWIW I have no access to the server.
>> All I'm doing is linking to a vendors server (as a client) and receiving
>> data via UDP.
>>
>> Re: My App (Client side).
>> Not sure what more I can do to redesign.
>>
>> Have the vendors ActiveX dll which contains only three events:
>> 1) data receive;
>> 2) timestamp; and
>> 3) error.
>> I've coded against all three.
>>
>> As previously stated error event does Not trigger when server stops
>> sending data (rebooted).
>> Only way to tell server went down is look at my Caption (where I display
>> the timestamp).
>> Every day at exactly 4:45:33 seconds my App stops receiving data --
>> timestamp has stopped.
>>
>> Closing my App, and then restarting it (my App)
>> relinks to server and everything is OK for another 24 hours.
>>
>>
>>
>> "John Simpson" <jasimp(a)earthlink.net> wrote in message
>> news:utB46hU8KHA.1424(a)TK2MSFTNGP04.phx.gbl...
>>>
>>> "David" <NoWhere(a)earthlink.net> wrote in message
>>> news:uvS9EAL8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
>>>> Ralph:
>>>> Thanks for response.
>>>>
>>>> "Hang" was a poor choice of wording on my part. App still functions
>>>> just isn't receiving data. Better choice wording should of been
>>>> "have auto reconnect back to server"
>>>>
>>>> From this point it
>>>>> should be an easy step to design a recovery mechanism.
>>>>
>>>> Above statement doesn't help a lot. For example: how do I detect that
>>>> connection was lost so I can begin recovery?
>>>>
>>>> Any ideas?
>>>>
>>>>
>>>> "ralph" <nt_consulting64(a)yahoo.net> wrote in message
>>>> news:li9hu590v6ihfg9mmrmgflhqjio6rilh4a(a)4ax.com...
>>>>> On Mon, 10 May 2010 18:17:16 -0400, "David" <NoWhere(a)earthlink.net>
>>>>> wrote:
>>>>>
>>>>>>I have a program (I'm the client) that connects to a server.
>>>>>>The server reboots everyday (out of my control) at 4:45:00 for three
>>>>>>seconds.
>>>>>>
>>>>>>At this time my program hangs (stops receiving data) and does Not
>>>>>>continue after the three second interruption.
>>>>>>
>>>>>>Is there a solution to reestablish or maintain this connection other
>>>>>>than:
>>>>>>
>>>>>>1) manually reconnecting, or
>>>>>>2) setting up a time tracking program to have XP close and then
>>>>>> re-start my program -- (can see problems with this if the
>>>>>> server changes reboot time)
>>>>>>
>>>>>>Thanks
>>>>>>David
>>>>>>
>>>>>>
>>>>>
>>>>> Difficult to answer without more information, but generally there is a
>>>>> solution.
>>>>>
>>>>> Stepping back a bit, it is a poor design that allows a program to
>>>>> "hang" just because it has lost connection with some resource. At the
>>>>> very least you should have simple error handling in place to detect
>>>>> this and allow the program to close gracefully. From this point it
>>>>> should be an easy step to design a recovery mechanism.
>>>>>
>>>>> -ralph
>>>>>
>>>>>
>>>
>>> David,
>>>
>>> do a retval = dir(some-known-file-on-server). If not len(retval), server
>>> is down.
>>>
>>> Maybe you can do a do loop until len(retval) is true.
>>>
>>> John
>>>
>>>
>>> __________ Information from ESET Smart Security, version of virus
>>> signature database 5106 (20100511) __________
>>>
>>> The message was checked by ESET Smart Security.
>>>
>>> http://www.eset.com
>>>
>>>
>>>
>>
>>
>
>


From: Nobody on
"David" <NoWhere(a)earthlink.net> wrote in message
news:uTiBUtV8KHA.1760(a)TK2MSFTNGP04.phx.gbl...
> Mr Simpson:
>
> I tried puttiing KeepAliveTime in registry-- did Not work.
> Went down today at the usual time.
>
> FWIW I have no access to the server.
> All I'm doing is linking to a vendors server (as a client) and receiving
> data via UDP.
>
> Re: My App (Client side).
> Not sure what more I can do to redesign.
>
> Have the vendors ActiveX dll which contains only three events:
> 1) data receive;
> 2) timestamp; and
> 3) error.
> I've coded against all three.
>
> As previously stated error event does Not trigger when server stops
> sending data (rebooted).
> Only way to tell server went down is look at my Caption (where I display
> the timestamp).
> Every day at exactly 4:45:33 seconds my App stops receiving data --
> timestamp has stopped.
>
> Closing my App, and then restarting it (my App)
> relinks to server and everything is OK for another 24 hours.

You can "reconnect" by releasing all references to any ActiveX DLL
object(Set obj = Nothing), which unloads the DLL, then use "Set" again(Set
obj = New Project1.Class1). Avoid declaring your variables "As New", like
"Dim o As New Class1", use "Set" to create an instance instead.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: The NNTP exodus continues.
Next: VB6 to Web