Difference between revisions of "Pc2v9.ini"

From PC2wiki
Jump to: navigation, search
m (Name Value Pairs Descriptions: add baseRunNumber)
m (Sample Secondary Server pc2v9.ini file: added proxyme and remote server command line option)
Line 52: Line 52:
 
  [server]
 
  [server]
 
  remoteServer=mainserver.acme.com:62002
 
  remoteServer=mainserver.acme.com:62002
 +
 +
The secondary server can also be specified on the command line,
 +
the command line option will override the entry in the pc2v9.ini file.
 +
 +
--remoteServer mainserver.acme.com:62002
  
 
See [[Joining Server Startup]] to learn which port a [[Secondary server]]
 
See [[Joining Server Startup]] to learn which port a [[Secondary server]]
 
will listen on.
 
will listen on.
 +
 +
===Secondary Server as a proxied (firewalled)===
 +
 +
Starting with Version 9.6.0 there is a feature to provide support for
 +
firewalled servers.    This feature removes a requirement that all
 +
servers must have a public (non-firewalled) port.  With proxyme
 +
the server that the secondary server logs into becomes the proxy
 +
for that server.
 +
 +
# when this server logs in make the logged inot server my proxy
 +
proxyme=true
 +
 +
The proxyme can also be specified on the command line,
 +
the command line option will override the entry in the pc2v9.ini file.
 +
 +
--remoteServer mainserver.acme.com:62002 --proxyme
  
 
==Sample pc2v9.ini file==
 
==Sample pc2v9.ini file==

Revision as of 07:04, 31 August 2017

The pc2v9.ini file contains settings as well as information to contact a server.

Format

All blank lines and lines starting with # are ignored.

A section (set of name value pairs) is a name surrounded by square brackets.

Name value pairs are a name, equals sign, and then value. Names are case insensitive by PC² whereas values are case sensitive.

Default host and port

If the pc2v9.ini is not in the current directory, then the server to contact will be localhost:50002. Effectively the ini client section is:

[client]
server=localhost:50002

Sample Client pc2v9.ini file

This example can be used by all client modules ( Administrator module, Team module, Judge module, Scoreboard module) The server to contact is 192.45.200.21 at port 50200.

# Client pc2v9.ini

[client]
server=192.45.200.21:50200

Sample Server pc2v9.ini file

For a Primary server (a Server module which is the server to be contacted) no pc2v9.ini file is needed if default host and port values are used.

# Server Port Assignment for server at mainserver.acme.com

[server]
port=62002

Sample Secondary Server pc2v9.ini file

For a Secondary server server (a Server module joining a contest). In the following example the Primary server has started on host mainserver.acme.com and is listening on port 62002.

# Minimal Remote Server pc2v9.ini
[server]
remoteServer=mainserver.acme.com:62002

The secondary server can also be specified on the command line, the command line option will override the entry in the pc2v9.ini file.

--remoteServer mainserver.acme.com:62002

See Joining Server Startup to learn which port a Secondary server will listen on.

Secondary Server as a proxied (firewalled)

Starting with Version 9.6.0 there is a feature to provide support for firewalled servers. This feature removes a requirement that all servers must have a public (non-firewalled) port. With proxyme the server that the secondary server logs into becomes the proxy for that server.

# when this server logs in make the logged inot server my proxy
proxyme=true

The proxyme can also be specified on the command line, the command line option will override the entry in the pc2v9.ini file.

--remoteServer mainserver.acme.com:62002 --proxyme

Sample pc2v9.ini file

This is a reference version of the pc2v9.ini and is present in the Version 9 distribution in the samps directory.

#
# File:   pc2v9.ini - all settings for pc2
# Author: pc2@ecs.csus.edu
#
# See details/info at http://pc2.ecs.csus.edu/wiki/Pc2v9.ini
#

[client]
# server=76.212.98.127:50002
server=localhost:50002

# plaf=java 
# plaf=native

[server]

# Port for Sever to initially listen to.
# port=50200

# remoteServer=76.212.98.128:50002

#base (first) run number for this site
baseRunNumber=1001

# eof pc2v9.ini $Id$

Name Value Pairs Descriptions

Table of Name Value Pairs
Section Name Value format Description
client server host:port host and port for server
client plaf java or native Pluggable Look and Feel for GUI
server remoteServer host:port host that Secondary server connects to
server port port override port to listen on
server baseRunNumber number of init run id start run at number rather than 1

See Also