void UpdateNetwork() { if (socket != null) { socket.Update(); var con = socket.IsConnected; if (wasConnected) { var time = Time.realtimeSinceStartup; if (time > timeLastCmd + pongCmdFreqInSecs) // раз в 5 сек проверяем коннект { cmdPong(); } } wasConnected = con; } }
//public UdpSocket udpSocket = new UdpSocket(); //private Lockstep mLockStep = new Lockstep(); //private FrameData mFrameData = new FrameData(); #endregion public void Update() { tcpSock.Update(); //mLockStep.Update(); }