Launch socket server from inside Unity?

Is it possible to launch the load balancing photon socket server from inside unity?

I'm using the cloud, but I would also like players to be able to host their own lan games.
Players should launch the server from inside the game, rather than through PhotonControl.
I would imagine I can create a process like this:

[code2=csharp]var p = new System.Diagnostics.Process();
p.StartInfo.FileName = "notepad.exe";
p.Start();[/code2]

However I'm not sure what arguments I should be providing

[code2=csharp]var p = new System.Diagnostics.Process();
p.StartInfo.FileName = "PhotonSocketServer.exe";
p.StartInfo.Arguments = "???";
p.Start();[/code2]

Comments

  • Have a look into the server SDKs deploy / binary folder (where PhotonSocketServer.exe is).
    The cmd files ("_run-Photon-as-application.start.cmd") contain the relevant parameters.

    Technically, your license does not allow to re-distribute Photon just yet but we're working on a redistributable package to support LAN sessions, too.
    We're going to announce this on our blog when done. Get in touch with us by mail, if you need it earlier. For the time being you can of course work on this feature in your client.