public override void Connect() { Networking = new ClientNetworking(); // we need this so as to create Outgoing messages :\ server = ServerBase.CreateReflection(); Config config = Config.ReadFile(settingsFilename); if (config == null) { config = server.CreateDefaultConfig(); config.SaveToFile(settingsFilename); } server.Start(false, config); SendClientInfo(); }
static void Main(string[] args) { ServerBase server = ServerBase.CreateReflection(); Config config = Config.ReadFile(settingsFilename); if (config == null) { config = server.CreateDefaultConfig(); config.SaveToFile(settingsFilename); } server.Start(true, config); while (server.IsRunning) { server.HandleCommand(Console.ReadLine()); } }
public ServerGUI() { InitializeComponent(); TextWriter tw = new TextBoxStreamWriter(txtOutput); Console.SetOut(tw); Console.SetError(tw); server = ServerBase.CreateReflection(); Config config = Config.ReadFile(settingsFilename); if (config == null) { config = server.CreateDefaultConfig(); config.SaveToFile(settingsFilename); } server.Start(true, config); this.Text = server.Name; }