-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
23 lines (19 loc) · 713 Bytes
/
Copy pathProgram.cs
File metadata and controls
23 lines (19 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.IO;
using PhotonServer;
// Self-test the V18 codec without a network round-trip.
if (args.Length == 1 && args[0] == "selftest")
{
SelfTest.RunV18();
return;
}
// Config lives next to the executable's working directory. A default config.json
// is written on first run.
string configPath = Path.Combine(Directory.GetCurrentDirectory(), "config.json");
var config = ServerConfig.Load(configPath);
// A single port list may also be passed on the command line to override config.
if (args.Length > 0)
config.Ports = Array.ConvertAll(args, a => int.Parse(a));
Console.WriteLine("photon-server");
new PhotonServer.PhotonServer(config).Run();