public void ConfigureServer(string sPort, string sClients, int iBandwidth) { int port, clients; if (Int32.TryParse(sPort, out port) && Int32.TryParse(sClients, out clients)) { Host = new TelemetryServer(); HostData = new TelemetryServerData(Host, iBandwidth); if (Host.Start() && HostData.Start()) { IsHost = true; IsClient = false; } else { FireError("Failed to start server at port " + port); } FireChange(); } else { FireError("Invalid server parameters"); } }
public void ConfigureServer(string sPort, string sClients, int iBandwidth) { int port, clients; if (Int32.TryParse(sPort, out port) && Int32.TryParse(sClients, out clients)) { Host = new TelemetryServer(); HostData = new TelemetryServerData(Host, iBandwidth); if (Host.Start() && HostData.Start()) { IsHost = true; IsClient = false; } else { FireError("Failed to start server at port " + port); } FireChange(); } else { FireError("Invalid server parameters"); } }
public TelemetryServerData(TelemetryServer mServer, int bandwidth) { _mServer = mServer; Bandwidth = bandwidth; }