Files
narya/tests/src/as/com/threerings/bureau/client/TestClientMain.as
T
Jamie Doornbos fd49818c3c quick and dirty script to help evaluate problems with thane client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5084 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-12 23:32:14 +00:00

34 lines
924 B
ActionScript

/**
* The main entry point for the bureau test client to be run in thane. Arguments:
* 0: the token to use to log back into the server
* 1: the bureau id of this instance
* 2: the name of the server to log into
* 3: the port to connect to on the server
*/
import avmplus.System;
import com.threerings.bureau.client.TestClient;
if (System.argv.length != 4) {
trace("Expected 4 arguments: (token) (bureauId) (server) (port)");
}
var token :String = System.argv[0];
var bureauId :String = System.argv[1];
var server :String = System.argv[2];
var port :int = parseInt(System.argv[3]);
trace("Token: " + token);
trace("BureauId: " + bureauId);
trace("Server: " + server);
trace("Port: " + port + " (parsed from " + System.argv[3] + ")");
// create the client and log on
var client :TestClient = new TestClient(token, bureauId);
client.setServer(server, [port]);
client.logon();
// run it
//client.run();