 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Pablo Guest
|
Posted: Fri Jan 23, 2004 9:56 pm Post subject: time out when net problem |
|
|
Hi, I have a program that uses an idSNTP client to get the current
time, but sometimes the unternet connection goes down and the program
cant get the time and halts. How can my program stop the sntp client
to restore the program control with a personal error message? thanks.
|
|
| Back to top |
|
 |
Maarten Wiltink Guest
|
Posted: Sat Jan 24, 2004 10:45 am Post subject: Re: time out when net problem |
|
|
"Pablo" <portiz (AT) hal (DOT) famaf.unc.edu.ar> wrote
| Quote: | Hi, I have a program that uses an idSNTP client to get the current
time, but sometimes the unternet connection goes down and the program
cant get the time and halts. How can my program stop the sntp client
to restore the program control with a personal error message? thanks.
|
What exactly do you mean by "restore the program control"?
Closing another Windows application is a well-known and solved
problem; feeding the right words into Google will give you the
solution.
Technically, SNTP defines a one-shot operation: to ask for a
timestamp. Reacting to it, adjusting the local system's time,
need not even be within the purview of the client component.
The program using the component may be the source of the
undesired behaviour of "halting" (another case of "what exactly
do you mean by that?").
Groetjes,
Maarten Wiltink
|
|
| Back to top |
|
 |
Pablo Guest
|
Posted: Sat Jan 24, 2004 7:44 pm Post subject: Re: time out when net problem |
|
|
"Maarten Wiltink" <maarten (AT) kittensandcats (DOT) net> wrote
| Quote: | "Pablo" <portiz (AT) hal (DOT) famaf.unc.edu.ar> wrote in message
news:164aea8d.0401231356.226a33f3 (AT) posting (DOT) google.com...
Hi, I have a program that uses an idSNTP client to get the current
time, but sometimes the unternet connection goes down and the program
cant get the time and halts. How can my program stop the sntp client
to restore the program control with a personal error message? thanks.
What exactly do you mean by "restore the program control"?
|
If I run my program in a PC without an Internet connection, the
program halts and I cant do anything with ut but to press Ctrl+Alt+Del
and close it; I mean, no button responds, I cant close it with the X
button, it does nothing, it stops working. So I want to be able to set
the program to stop any attempt to connect after some time and to tell
what happend or to go on like nothing happend. I hope you can help me.
Thanks.
| Quote: | Closing another Windows application is a well-known and solved
problem; feeding the right words into Google will give you the
solution.
Technically, SNTP defines a one-shot operation: to ask for a
timestamp. Reacting to it, adjusting the local system's time,
need not even be within the purview of the client component.
The program using the component may be the source of the
undesired behaviour of "halting" (another case of "what exactly
do you mean by that?").
Groetjes,
Maarten Wiltink
|
|
|
| Back to top |
|
 |
Maarten Wiltink Guest
|
Posted: Sun Jan 25, 2004 1:57 pm Post subject: Re: time out when net problem |
|
|
"Pablo" <portiz (AT) hal (DOT) famaf.unc.edu.ar> wrote
| Quote: | "Maarten Wiltink" <maarten (AT) kittensandcats (DOT) net> wrote
"Pablo" <portiz (AT) hal (DOT) famaf.unc.edu.ar> wrote in message
news:164aea8d.0401231356.226a33f3 (AT) posting (DOT) google.com...
Hi, I have a program that uses an idSNTP client to get the current
time, but sometimes the unternet connection goes down and the program
cant get the time and halts. How can my program stop the sntp client
to restore the program control with a personal error message? thanks.
What exactly do you mean by "restore the program control"?
If I run my program in a PC without an Internet connection, the
program halts and I cant do anything with ut but to press Ctrl+Alt+Del
and close it; I mean, no button responds, I cant close it with the X
button, it does nothing, it stops working. So I want to be able to set
the program to stop any attempt to connect after some time and to tell
what happend or to go on like nothing happend. I hope you can help me.
|
There is no connection. SNTP is a UDP protocol. What the program appears
to do is send a request and wait for the response. When the response
doesn't come, it keeps waiting. And waiting. And doing nothing else but
waiting.
There is no way out of that except to get a better program. It looks like
this one was written by somebody who didn't understand NTP, SNTP, UDP, or
even Windows at all.
What Windows are you using? I guess Windows 95/98/98SE/ME; that rules
out the superior option of running the full NTP daemon. The NTP website
(www.ntp.org) lists many SNTP client programs. Or used to; on a quick
check I can't find such a list. I've used SocketWatch in the past (not
free).
Groetjes,
Maarten Wiltink
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|