static void Main(string[] args) { Console.Title = "Poro"; //Set the host to the local machine's IP address. We can't use localhost for RTMPS! _settings = new PoroServerSettings { RTMPSHost = LocalIPAddress() }; //Enable the handler for when the server closes to remove the certificate from the CA chain. handler = new ConsoleEventDelegate(ConsoleEventCallback); SetConsoleCtrlHandler(handler, true); //Start the server PoroServer server = new PoroServer(_settings); server.Start(); //Run an infinite loop while server running while (true) { ; } }
// // PropertyRedirector // The property redirector modifies the lol.properties on the fly by watching for a patcher launch. // The patcher writes the lol.properties file on launch each time so by modifying it AFTER the patcher launches. // We can use our own custom lol.properties to connect to our RTMPS server without actually making the user go through // modifying it manually. The file gets rewritten on each launch so this modification is only temporary. // // Notes: The LoLPatcher does 3 writes to lol.properties. Just override the last one. // public PropertyRedirector(PoroServerSettings settings) { _settings = settings; _watcher = new FileSystemWatcher(); _watcher.Path = _settings.LeagueDrive; _watcher.Filter = "lol.properties"; _watcher.IncludeSubdirectories = true; _watcher.NotifyFilter = NotifyFilters.LastWrite; _watcher.Changed += new FileSystemEventHandler(OnChanged); _watcher.EnableRaisingEvents = true; }
static void Main(string[] args) { PoroServerSettings settings = new PoroServerSettings { RTMPSHost = LocalIPAddress() }; PoroServer server = new PoroServer(settings); server.Start(); while (true) { ; } }
static void Main(string[] args) { Console.Title = "Poro"; _settings = new PoroServerSettings { RTMPSHost = LocalIPAddress() }; handler = new ConsoleEventDelegate(ConsoleEventCallback); SetConsoleCtrlHandler(handler, true); PoroServer server = new PoroServer(_settings); server.Start(); while (true) { ; } }