Ejemplo n.º 1
0
 public void CloseServer()
 {
     if (server != null)
     {
         server.Close();
         server = null;
     }
 }
Ejemplo n.º 2
0
        public void OpenServer(int port = 49983)
        {
#if UNITY_EDITOR
            if (PlayerSettings.runInBackground == false)
            {
                Debug.Log("Suggest setting PlayerSettings runInBackground = true");
            }
#endif
            CloseServer();

            server = new IFMServer(port);
            server.PacketReceivedEvent += OnPacketReceived;
        }