#!/bin/csh -f # Script to start the FXC repeater. # (Note: This script is not necessary if the repeater and # server run on the same host. In this case the repeater # can be started directly with the run-server command # by adding the parameter "-repeaterport [port]" to the # serverManager arguments. The client uses the ip addresses # in Hosts.txt to route the message to the server). # # This script starts a repeater on a Windows or Linux machine that # does not have or support a server. The repeater reads messages # on its input port 1128 (default) and forwards the messages # over the same port to one or more receivers (e.g. server, # client, or another repeater). An FXC client establishes the # connection by using the repeater's address in the Hosts.txt # file and requesting the repeater to establish a connection # with the desired server (also from Hosts.txt). Once the connection # is established the server routes the reply back through the # established path. If multiple clients are connected to the # server the repeater sends the reply to all of the clients. # # Sample Hosts.txt entries: # # Denver 123.45.67.89 123.45.12.23 # Boulder 123.45.67.88:1122 123.45.12.22:1129 # ^ ^ # Repeater address and port Server address and port # # # The repeater accepts the following options: # # fxc.transceiver.hostaddress - normally is the host ip address # fxc.transceiver.receiverport - if not defined, is 1128 # fxc.transceiver.sockettimeout - if not defined, is 15 sec # fxc.transceiver.pruneinterval - if not defined, is 10 min # fxc.transceiver.throughput - if not defined, is 20 KB/s # fxc.transceiver.idletimeout - if not defined, is 20 min # fxc.transceiver.sendthreads.min - if not defined, starts with 0 # fxc.transceiver.sendthreads.max - if not defined, is 8 # fxc.transceiver.receivethreads - if not defined, is 4 # java.security.policy - if not defined, is # fxc.home - must specify where the FXC home directory can be found # # Determine location of FXC/fsl/linux directory set dir=`dirname $0` set file=`basename $0` if ( "$dir" != "." ) then echo "Changing directory" cd $dir exec ./$file endif # Set FXC system environment source ./fxcenvirons.csh if ($stat != "0") then exit 1 endif # Run the repeater cd ../net java -Dfxc.home=$FXC_HOME fsl.net.Repeater