Beispiel #1
0
 public void RunCPPServer()
 {
     while (true)
     {
         IntPtr ptrRes          = DLLImporter.createAndListenSocket(this.gameConfig.ServerAdress, (ushort)this.gameConfig.Port);
         var    responseData    = Marshal.PtrToStringAnsi(ptrRes);
         var    deserializedKey = JsonConvert.DeserializeObject <Keys>(responseData);
         gameActionService.ProcessPlayerAction(deserializedKey);
     }
 }
Beispiel #2
0
 public void SendMessageToCPP(Keys key)
 {
     var responseData = DLLImporter.sendMessageToSocket((int)key, (ushort)this.enemyServerPort, this.enemyServerAddres);
 }