It is possible for clients to listen for an available FairCom Server without knowing the Server Name in advance. Typically, client applications must know the Server Name of the FairCom Server, which is customer configurable, and the host name for the machine running the FairCom Server. This required a lot of coordination on the part of the Administrator or the developer. The FairCom Server can be configured to broadcast its Server Name and IP address over a TCP/IP port. With this method, it is possible for a client to detect the various FairCom Servers operating on the network and obtain their Server Names, including IP addresses.
The default value is 0, which means the broadcast is off.
If DEFAULT is specified, this means that the broadcast is on and the default port is used, which is 5595.
Any valid four-byte integer greater than 5000 that is not in use by another process may be specified. This should NOT be the port for the FairCom Server, which is displayed at startup and is based on the Server Name. See the examples below.
If the number is negative, each broadcast is also sent to the FairCom Server standard output.
To prevent unreasonable values, the maximum value allowed is set to 86,400 seconds, which is once per day.
Using the following sample keywords and assuming the host IP address was 127.0.0.1, the FairCom Server broadcasts “SAMPLE | 127.0.0.1 | 5451| FAIRCOM_SERVER” on port 6329 every 90 seconds:
When the FairCom Server broadcasts, it sends the Server Name specified in the configuration file, “FAIRCOMS” by default, with an at-sign, ‘@’, followed by the FairCom Server host IP address. If a BROADCAST_DATA token was also specified, this is followed by a vertical bar character, ‘|’, which is followed by the token.
On the client side, GetServerInfo() listens on the default port and stores the broadcast string in buffer. See GetServerInfo for more information. GetServerInfoXtd() listens on the specified port and stores the broadcast string in buffer. See GetServerInfoXtd for more information. See ctixmg.c for an example implementation of this feature.