コード例 #1
0
 /// <summary>
 /// Starts a specific server
 /// </summary>
 /// <param name="cfg">The configuration of the specific server to run</param>
 protected override void StartServer(ServerConfiguration cfg)
 {
     if (cfg.Name == ServerName)
     {
         Server = new GPSPServer(cfg.Name, databaseDriver, IPAddress.Parse(cfg.Hostname), cfg.Port);
         LogWriter.Log.Write(LogLevel.Info, "|{0,-11}|{1,-14}|{2,-6}|", cfg.Name, cfg.Hostname, cfg.Port);
     }
 }
コード例 #2
0
 /// <summary>
 /// Starts a specific server
 /// </summary>
 /// <param name="cfg">The configuration of the specific server to run</param>
 protected override void StartServer(GameSpyLib.RetroSpyConfig.ServerConfig cfg)
 {
     if (cfg.Name == ServerName)
     {
         Server = new GPSPServer(IPAddress.Parse(cfg.ListeningAddress), cfg.ListeningPort).Start();
         Console.WriteLine(
             StringExtensions.FormatServerTableContext(cfg.Name, cfg.ListeningAddress, cfg.ListeningPort.ToString()));
     }
 }
コード例 #3
0
 /// <summary>
 /// Starts a specific server
 /// </summary>
 /// <param name="cfg">The configuration of the specific server to run</param>
 protected override void StartServer(ServerConfiguration cfg)
 {
     //if (cfg.Disabled)
     //    return;
     //LogWriter.Log.Write("Starting {2} server at  {0}:{1}.", LogLevel.Info, cfg.Hostname, cfg.Port, cfg.Name);
     //LogWriter.Log.Write("Maximum connections for {0} are {1}.", LogLevel.Info, cfg.Name, cfg.MaxConnections);
     if (cfg.Name == ServerName)
     {
         // case "GPCM":
         Server = new GPSPServer(cfg.Name, databaseDriver, new IPEndPoint(IPAddress.Parse(cfg.Hostname), cfg.Port), cfg.MaxConnections);
         LogWriter.Log.Write(LogLevel.Info, "|{0,-11}|{1,-14}|{2,-6}|{3,14}|", cfg.Name, cfg.Hostname, cfg.Port, cfg.MaxConnections);
     }
 }
コード例 #4
0
 public GPSPSession(GPSPServer server) : base(server)
 {
 }
コード例 #5
0
 public GPSPSession(GPSPServer server) : base(server)
 {
     DisconnectAfterSend = true;
 }