internal Program(CmdLineOptions options) { _busMaster = new NetNode(listenPort: (int)options.BusPort); _busPort = options.BusPort; // TODO: Command-line flag to change universe size _routingTable = new RoutingTable(_busMaster, null, 1 << 31); _apiRouter = new Router <ArbiterApi>(new ArbiterApi(_routingTable)); _busMaster.PeerConnectedEvent += OnSGameConnected; _busMaster.PeerDisconnectedEvent += OnSGameDisconnected; _busMaster.PacketProcessor.Events <SShared.Messages.TransferShip>().OnMessageReceived += OnShipTransferRequest; _updateTimer = new Timer(1000.0 / options.Tickrate); _updateTimer.AutoReset = true; _updateTimer.Elapsed += Update; }
public ArbiterApi(RoutingTable routingTable) { this.RoutingTable = routingTable; }