The timesync server is a connection oriented iterative server using either TCP sockets or QNX native message passing IPC method. This server will allow date/time synchronization of other computers. The server is based upon the server IPC API.
The timesync server does not attempt to implement any of the Internet time protocols. Timesync is much more simple than that. The main idea is that an Internet-based atomic clock client application (like rdate for Linux) runs on the same machine where the timesync server also runs. All machines inside the network (intranet) then synchronize their date and time with the timesync server instead of every machine synchronizing their date and time directly with the Internet.
The server should be run on a machine that has either a part-time or full-time connection to the Internet. Use one of the many available atomic time client applications on this same machine to set the local date and time. This atomic time will be sent to other machines as requested. The datimec client uses the timesync API to set the date and time.
Note that any mention of QNX in this document refers to the QNX 4.x OS.
In order to use the timesync server, you first must create the socloc startup file which should contain a list of suggested socloc servers. The list may be incomplete but at least one entry must describe an active socloc server. The socloc startup file must be located in the current directory when you execute the program.
The timesync server requires at least one socloc server to be responding. It is important to remember that the socloc server should be started prior to any socket server or client that requires socloc services. The timesync server logs information to either a private log file or to the system log server by using the logging manager API. Note that the QNX version of this application does not use or require socloc.
The timesync server accepts a limited number of commands including all common socket codes.
The timesync server is a normal process and not a daemon/service.
The timesync server can be compiled for all stated platforms except DOS where there is no TCP IPC method.
Under the Linux/Unix/QNX operating systems, the timesync application can be compiled using the mktimesync script.
The timesync server has the following command line syntax:
TCP: timesync [-q] [-l log_file] port QNX: timesync [-q] [-l log_file]
Where port is the TCP/IP port that the timesync server should listen to. The optional parameter q is used to have the server run quietly without any console/screen output. The optional parameter l (el) is used to specify an output destination. If the log destination is not specified, the default log file name given in the timesync code will be assumed. Note that the switch character (a dash/hyphen [-] is shown here) depends on the platform the application is running on.