public void Init(System.Net.IPEndPoint inServerAddress, string inName, byte inWorldId) { base.Init(core.World.DefaultWorldCount); // client NetPeerConfiguration config = new NetPeerConfiguration("game", inServerAddress.AddressFamily); #if DEBUG // 디버깅 환경에서 타임 아웃 처리 조정 config.ConnectionTimeout = 300f; //if (Configuration.Instance.EnableLatencySimulation) //{ // config.SimulatedLoss = Configuration.Instance.SimulatedLoss; // config.SimulatedRandomLatency = Configuration.Instance.SimulatedRandomLatency; // config.SimulatedMinimumLatency = Configuration.Instance.SimulatedMinimumLatency; // config.SimulatedDuplicatesChance = Configuration.Instance.SimulatedDuplicatesChance; //} #endif //config.AutoFlushSendQueue = false; mNetPeer = new NetClient(config); mNetPeer.Start(); mDeliveryNotificationManager = new core.DeliveryNotificationManager(true, false); mReplicationManagerClient = new ReplicationManagerClient(); algo = new NetXorEncryption(GetClient(), "AceTopSecret"); mLastRoundTripTime = 0.0f; mTimeOfLastInputPacket = 0f; mServerAddress = inServerAddress; mState = NetworkClientState.SayingHello; mTimeOfLastHello = 0.0f; mTimeOfLastStartPlay = 0.0f; mName = inName; mWorldId = inWorldId; tryConnectCount = 0; mAvgRoundTripTime = new core.WeightedTimedMovingAverage(1.0f); NetOutgoingMessage hail = GetClient().CreateMessage("hail"); GetClient().Connect(mServerAddress, hail); IsTcp = false; IsUdpOk = false; IsTrySend = true; respawn = false; // tcp SetConnector(inServerAddress); LinkedObject.Clear(); }