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 initRequest ) { } protected override void Setup() { } protected override void TearDown() { } }
And we'll also create a new PhotonAckPeer
class as follows:
using Photon.SocketServer; using PhotonHostRuntimeInterfaces; class...