Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:918] Re: [VANILLA-L:914] .metaservers



On Jul 29, 13:56, Bob Tanner wrote:

>Quoting Frank Niessink (frankn@cs.vu.nl):
>> Bob, why don't you add metaserver.eu.netrek.org to continuum's .metaservers
>> file, so that we can see how well that communication performs.
>
>What is the format of the .metaservers file again?
>
>I think this needs to be documented, I did not find anything about it
>in the LIBDIR/docs directory.

True. James did send some instruction to this list before (included below).
James, could you add that mail to the vanilla distribution?

Cheers, Frank

-----------------------------------%<--------------------------------------
From:    James Cameron <cameron@ogg.stl.dec.com>
Date:    Wed Apr 15, 14:36
To:      vanilla-l@us.netrek.org
Subject: [VANILLA-L:835] Metaservers-HowTo

This is the documentation for how to have a new server solicit the
metaserver for players.

It works like this;

	- you set up a .metaservers file with the addresses of the
	  metaservers that should be kept informed,
	
	- when new players arrive on your server, a packet is sent to
	  the metaservers informing them of the current player count,
	
	- periodically, the metaservers are told about current status.

The format of the file is a series of space delimited fields interpreted
using fscanf().  Very primitive.  The code looks for the file in the
current working directory rather than LIBDIR.  This ought to be fixed.

The order and format of the fields is described in ntserv/solicit.c

    /* data items derived from metaservers file */
    char host[32];          /* address of metaserver (DNS)          */
    int port;               /* port of metaserver                   */
    int minimum;            /* minimum update time                  */
    int maximum;            /* maximum update time                  */
    char ours[32];          /* DNS address of server                */
    char type[2];           /* server type code (B/P/C/H/?)         */
    int pport;              /* server main player port (e.g. 2592)  */
    int oport;              /* server observer player port          */
    char comment[32];       /* comment string                       */

The first address should be a numeric IP address in order to avoid DNS
lookup delay on every new player or solicitation update.  Or place a
host name in your /etc/hosts file that corresponds to the metaservers.

Here is the sample_metaservers file ...

metaserver.us.netrek.org 3521 0 60 this.host.name B 2592 3592 open
metaserver.eu.netrek.org 3521 0 60 this.host.name B 2592 3592 open

Replace "this.host.name" with the DNS host name that you want the
metaservers to list the server under.  If you have a name within the
netrek.org domain, use that.  If the metaserver already lists your
server; use the name that the metaserver has for you.

This will cause the metaservers to be updated with game status
information every minute, subject to the limits in the code.

Beware: informing the metaserver more frequently than the limits define
will cause your server to be delisted from the metaserver automatically.
This is handled by program code at the metaserver.

--
James Cameron                                    (cameron@stl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800
-----------------------------------%<--------------------------------------

______________________________________________________________________________
"Don't tell me about the future," said Ford. "I've been all over the future. 
Spend half my time there. It's the same as anywhere else. Anywhen else. 
Whatever. Just the same old stuff in faster cars and smellier air."
	-- Douglas Adams, 'Mostly Harmless'
+
++ Vanilla-l Mailing List ++
To unsubscribe: send "unsubscribe vanilla-l" to majordomo@real-time.com
For more information: http://archives.real-time.com


Follow-Ups: References: