AiTown - aitown-index

Home

aitown-index is a command-line utility that is capable of storing a list of servers. Clients only need to know the address of the index server, querry it for the list of servers that it knows about and let the user choose one. Each entry in the list consists of a name, an address and a port. To invoke it, use following general form:

aitown-index [options]

Command line options

Servers advertise their presence to the index server and are required to inform the index server when they are closed. However, a server being listed in the index does not guarantee to the client that the server is up and running (ie. there is no "hartbeat" system to allow the index server to determine wether the server crashed).

List of options:

--help
prints usage information and exists the program; any other option is ignored;
--version
prints version information and exists the program; any other option is ignored, except help;
-pvalue --port=value
The port used to communicate with servers and clients; value is a positive integer and defaults to 29898;
-mvalue --max=value
Maximum number of servers that it accepts; servers attempting to add themselves to the index after this limit are rejected; value is a positive integer and defalts to 65000;

Config file

At load time, before reading command line options, the program looks for a configuration file named aitown-index.conf in current directory then in an operating system dependednt configuration directory (something like ~/.config/aitown-index.conf in unix, C:\Users\USERNAME\AppData\aitown-index\aitown-index.conf in Windows).

The config file consists of [sections] and value=key entries (see the example at the end of the section).

[general]
port=value
The port used to communicate with servers and clients; value is a positive integer and defaults to 29898;
maximum_number_of_servers=value
Maximum number of servers that it accepts; servers attempting to add themselves to the index after this limit are rejected; value is a positive integer and defalts to 65000;
Example config file:
[general]
; the port to use for index server
port = 29777
; reject requests at this watermark
maximum_number_of_servers = 100

For each setting, the command line takes precedence, then the value in config file and then the default value. Thus, if different ports are indicated by the config file and by the command line, the one on the command line is used.

Home