internal virtual void InitPeerBase() { this.TrafficStatsIncoming = new TrafficStats(this.TrafficPackageHeaderSize); this.TrafficStatsOutgoing = new TrafficStats(this.TrafficPackageHeaderSize); this.TrafficStatsGameLevel = new TrafficStatsGameLevel(); this.ByteCountLastOperation = 0; this.ByteCountCurrentDispatch = 0; this.bytesIn = 0L; this.bytesOut = 0L; this.packetLossByCrc = 0; this.networkSimulationSettings.LostPackagesIn = 0; this.networkSimulationSettings.LostPackagesOut = 0; lock (this.NetSimListOutgoing) this.NetSimListOutgoing.Clear(); lock (this.NetSimListIncoming) this.NetSimListIncoming.Clear(); this.peerConnectionState = PeerBase.ConnectionStateValue.Disconnected; this.timeBase = SupportClass.GetTickCount(); this.isEncryptionAvailable = false; this.ApplicationIsInitialized = false; this.roundTripTime = 300; this.roundTripTimeVariance = 0; this.packetThrottleInterval = 5000; this.serverTimeOffsetIsAvailable = false; this.serverTimeOffset = 0; }
internal void InitCallback() { if (this.peerConnectionState == PeerBase.ConnectionStateValue.Connecting) { this.peerConnectionState = PeerBase.ConnectionStateValue.Connected; } this.ApplicationIsInitialized = true; this.FetchServerTimestamp(); this.Listener.OnStatusChanged(StatusCode.Connect); }