public static void Deactivate()
        {
            NetworkHelper.OnFrameData -= HandleFrameData;
            NetworkHelper.OnInitData  -= HandleInitData;

            GameStarted = false;
            ServerSimulator.Stop();
        }
 public static void Setup()
 {
     if (SimulateNetworking)
     {
         ServerSimulator.Setup();
     }
     LSServer.Setup();
 }
        public static void Initialize(NetworkHelper networkHelper)
        {
            NetworkHelper              = networkHelper;
            NetworkHelper.OnFrameData += HandleFrameData;
            NetworkHelper.OnInitData  += HandleInitData;
            NetworkHelper.Initialize();

            LSServer.Initialize();
            GameStarted = false;
            if (SimulateNetworking)
            {
                ServerSimulator.Initialize();
            }
            else
            {
            }
            Registered = false;
        }
 public static void Distribute(byte[] data)
 {
     if (SimulateNetworking)
     {
         ServerSimulator.Receive(data);
     }
     else
     {
         if (isConnected)
         {
             SendMessageToServer(MessageType.Input, data);
         }
         else
         {
             bufferedSendData.Add(data);
         }
     }
 }