home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / daytime.zip / README < prev    next >
Text File  |  1999-01-14  |  4KB  |  85 lines

  1. - Overview
  2.  
  3. This file documents the time and daytime server and client programs
  4. for OS/2 and Windows NT. There is a server program (the daytimed.exe
  5. daemon) and a client program (daytime.exe).
  6.  
  7. The server implements the RFC 867 (daytime), RFC 868 (time) and RFC
  8. 1361 (SNTP) services, both for TCP and UDP protocols. The client can
  9. use any of these services and either protocol to retrieve the time
  10. from another host and adjust its local time. Using SNTP over TCP is an
  11. extension over RFC 1361 (although mentioned there).
  12.  
  13. While the daytime service is more intended for human use, the time and
  14. SNTP services are meant for machine use, like in these programs. But
  15. the server and client support all of them, for completeness. Also, the
  16. programs are named after the daytime service even though the time
  17. service or SNTP are the preferred methods.
  18.  
  19. Full source code is included, the programs can compiled with the
  20. emx+gcc package or IBM's VisualAge C++.
  21.  
  22. - Usage:
  23.  
  24. To install, copy the programs into a directory listed in the PATH. You
  25. are now ready to use the client program. Run them without arguments to
  26. get a description of their command line options.
  27.  
  28. - Special notes for the OS/2 server program:
  29.  
  30. To use the server program, you must decide if you want to run it all
  31. the time as a standalone daemon or as a subservice from the inetd
  32. super-daemon. The inetd method saves memory but makes the response
  33. time longer (since the server must be started as a process for each
  34. request). In addition, when used with inetd, the server can only
  35. respond to requests via the TCP protocol, not to UDP requests, due to
  36. the way inetd is implemented under OS/2 and due to my own lazyness.
  37. But then, usually the TCP protocol is to be preferred anyway.
  38.  
  39. To use the daytimed server with inetd, two lines must be added to
  40. \tcpip\etc\inetd.lst:
  41.  
  42.     daytime tcp daytimed -d
  43.     time tcp daytimed -t
  44.  
  45. That's all, then you have to restart inetd.
  46.  
  47. - Special notes for the Windows NT programs:
  48.  
  49. Both the client and the server programs can run as NT services. You
  50. can use -I and -U to install or uninstall them as services and then
  51. use NET START/STOP to start and stop them. The service names are
  52. daytime and daytimed, respectively. They appear as "Daytime Client"
  53. and "Daytime Server" in the NT control panel's services applet.
  54.  
  55. The client program will usually need command line arguments to run (to
  56. specify the service, protocol and server host to be used). You specify
  57. them at the time when you install it as a service in addition to -I.
  58. It will save them in the registry and use at the time started as a
  59. service. If you ever need to change the options used by the client
  60. program as a service, you need to uninstall it with -U and then
  61. install it as a service with -I and the new options again.
  62.  
  63. Running the client as a service makes, by the way, only sense when the
  64. -c option is used. Otherwise, it will terminate immediately after
  65. setting the time once. If you want to set the time in short intervals,
  66. run the client program with -c as a service. If you want to set the
  67. time only in longer intervals, such as once or twice a day or even
  68. longer, it is better to run the client program using the AT scheduling
  69. service.
  70.  
  71. - Copyright:
  72.  
  73. This code is in the public domain, but let me know if you make
  74. improvements to it or fix something that I missed.
  75.  
  76. Kai Uwe Rommel
  77.  
  78. --
  79. /* Kai Uwe Rommel                   ARS Computer & Consulting GmbH *
  80.  * rommel@ars.de (http://www.ars.de)             Muenchen, Germany *
  81.  * rommel@leo.org (http://www.leo.org/pub/comp/os/os2 maintenance) */
  82.  
  83. DOS ... is still a real mode only non-reentrant interrupt
  84. handler, and always will be.                -Russell Williams
  85.