public void AddAUnitJob(AmNetUnitJob aJob) { arrJobs.Add(aJob); mInEverySomeFrame = 5; mCounter -= mCounter % 5; mCounter += 3; SetState("PacketSend"); //mStt.DoAction (); }
// _////////////////////////////////////////////////_ _____ Send / Receive _____ Methods _____ public void SendPacket() { if (arrJobs.Count > 0) { CurJob = arrJobs [0]; CurJob.SendJob(); } SetState("Receive"); }
// 모델 데이터 외의 단순한 결과는 여기 변수로 저장 // _////////////////////////////////////////////////_ _____ Login _____ Static _____ // _////////////////////////////////////////////////_ _____ Util Method _____ Static _____ public static void AddWASJob2Thread(WasObject wasObj) { AmNetUnitJob uObj = new AmNetUnitJob() { Content = wasObj, jobName = wasObj.GetType().ToString() }; uObj.SendJob += wasObj.SendAction; uObj.dlgtJobCompleted += wasObj.JobCompleted; uObj.CtchJob += wasObj.CatchAction; AgStt.NetManager.AddAUnitJob(uObj); }
// _////////////////////////////////////////////////_ _____ Send / Receive _____ Methods _____ public void SendPacket() { if (arrJobs.Count > 0) { CurJob = arrJobs [0]; WasObject curWas = (WasObject)CurJob.Content; //Ag.LogString (" delg will send >>> " + curWas.dlgt_WillSend); if (curWas.dlgt_WillSend != null && !curWas.dlgt_WillSend()) { arrJobs.Remove(CurJob); Ag.LogDouble(" NetworkManagerMono :: Send Pack " + curWas.GetType() + " Will NOT be sent >>>> Cancel Case ... "); SetState("Online"); return; } CurJob.SendJob(); } SetState("Receive"); }
public void AddAUnitJob(AmNetUnitJob aJob) { arrJobs.Add(aJob); SetState("PacketSend"); mStt.DoAction(); }