protected DesktopGameHost(string gameName = @"", bool bindIPCPort = false) : base(gameName)
        {
            //todo: yeah.
            Architecture.SetIncludePath();

            foreach (string a in Environment.GetCommandLineArgs())
            {
                switch (a)
                {
                case @"--reload-on-change":
                    ensureShadowCopy();
                    break;
                }
            }

            if (bindIPCPort)
            {
                ipcProvider       = new TcpIpcProvider();
                IsPrimaryInstance = ipcProvider.Bind();
                if (IsPrimaryInstance)
                {
                    ipcProvider.MessageReceived += OnMessageReceived;
                    ipcTask = ipcProvider.Start();
                }
            }
        }
Beispiel #2
0
 public DesktopGameHost(string gameName = @"", bool bindIPCPort = false) : base(gameName)
 {
     if (bindIPCPort)
     {
         IpcProvider       = new TcpIpcProvider();
         IsPrimaryInstance = IpcProvider.Bind();
         if (IsPrimaryInstance)
         {
             IpcProvider.MessageReceived += msg => OnMessageReceived(msg);
             IpcTask = IpcProvider.Start();
         }
     }
 }