O'Reilly logo

Unity Multiplayer Games by Alan Stagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a server application

Let's create a new server application. Upon receiving any message, it will simply get an echo, a confirmation that it has received the message (an acknowledgement).

Creating a class library

Create a new class library project called PhotonAckServer. I have put mine in the src-server directory.

Now, we'll add three references to our project. These can be found in the libs directory of the Photon Server:

  • ExitGamesLibs.dll
  • Photon.SocketServer.dll
  • PhotonHostRuntimeInterfaces.dll

With these added, create a new PhotonAckServer class. This will inherit from ApplicationBase, code for the same is as follows:

using Photon.SocketServer; public class PhotonAckServer : ApplicationBase { protected override PeerBase CreatePeer( InitRequest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required