home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
daytime.zip
/
README
< prev
next >
Wrap
Text File
|
1999-01-14
|
4KB
|
85 lines
- Overview
This file documents the time and daytime server and client programs
for OS/2 and Windows NT. There is a server program (the daytimed.exe
daemon) and a client program (daytime.exe).
The server implements the RFC 867 (daytime), RFC 868 (time) and RFC
1361 (SNTP) services, both for TCP and UDP protocols. The client can
use any of these services and either protocol to retrieve the time
from another host and adjust its local time. Using SNTP over TCP is an
extension over RFC 1361 (although mentioned there).
While the daytime service is more intended for human use, the time and
SNTP services are meant for machine use, like in these programs. But
the server and client support all of them, for completeness. Also, the
programs are named after the daytime service even though the time
service or SNTP are the preferred methods.
Full source code is included, the programs can compiled with the
emx+gcc package or IBM's VisualAge C++.
- Usage:
To install, copy the programs into a directory listed in the PATH. You
are now ready to use the client program. Run them without arguments to
get a description of their command line options.
- Special notes for the OS/2 server program:
To use the server program, you must decide if you want to run it all
the time as a standalone daemon or as a subservice from the inetd
super-daemon. The inetd method saves memory but makes the response
time longer (since the server must be started as a process for each
request). In addition, when used with inetd, the server can only
respond to requests via the TCP protocol, not to UDP requests, due to
the way inetd is implemented under OS/2 and due to my own lazyness.
But then, usually the TCP protocol is to be preferred anyway.
To use the daytimed server with inetd, two lines must be added to
\tcpip\etc\inetd.lst:
daytime tcp daytimed -d
time tcp daytimed -t
That's all, then you have to restart inetd.
- Special notes for the Windows NT programs:
Both the client and the server programs can run as NT services. You
can use -I and -U to install or uninstall them as services and then
use NET START/STOP to start and stop them. The service names are
daytime and daytimed, respectively. They appear as "Daytime Client"
and "Daytime Server" in the NT control panel's services applet.
The client program will usually need command line arguments to run (to
specify the service, protocol and server host to be used). You specify
them at the time when you install it as a service in addition to -I.
It will save them in the registry and use at the time started as a
service. If you ever need to change the options used by the client
program as a service, you need to uninstall it with -U and then
install it as a service with -I and the new options again.
Running the client as a service makes, by the way, only sense when the
-c option is used. Otherwise, it will terminate immediately after
setting the time once. If you want to set the time in short intervals,
run the client program with -c as a service. If you want to set the
time only in longer intervals, such as once or twice a day or even
longer, it is better to run the client program using the AT scheduling
service.
- Copyright:
This code is in the public domain, but let me know if you make
improvements to it or fix something that I missed.
Kai Uwe Rommel
--
/* Kai Uwe Rommel ARS Computer & Consulting GmbH *
* rommel@ars.de (http://www.ars.de) Muenchen, Germany *
* rommel@leo.org (http://www.leo.org/pub/comp/os/os2 maintenance) */
DOS ... is still a real mode only non-reentrant interrupt
handler, and always will be. -Russell Williams