Exemplo n.º 1
0
 public void Initialization()
 {
     mWaitACKInfoList.Clear();
     mPackageInterceptMarkList.Clear();
     mACKPackageTemplate    = new ACKPackage(mUdpBox.PackageHeadBytes);
     mUdpBox.OnSendMessage += OnSendMessage;
     mUdpBox.RegistMessageIntercept(OnACKMessageIntercept);
     mUdpBox.RegistWorkThreadOperate(ACKWaitPackageLogicUpdate);
 }
Exemplo n.º 2
0
        public void Start(bool isMaster)
        {
            IsMaster = isMaster;

            if (mUseInternalBroadcastLogic)
            {
                mBroadcastUdpClient = UDPBoxFactory.GeterateUdpClient(BroadcastListenPort);
                mUDPBoxBroadcast    = UDPBoxFactory.GenerateStandardUDPBoxBroadcastAndSetup(mBroadcastUdpClient, BroadcastSendPort, BroadcastNetPrefixIP, this);
            }

            UDPBox.RegistMessageIntercept(InterceptAndUpdateConnectState);
            UDPBox.RegistWorkThreadOperate(RefreshConnectStateInWorkThread);
            UDPBox.Start();
        }
Exemplo n.º 3
0
        public override void OnRegistedToUDPBox(UDPBox udpBox)
        {
            base.OnRegistedToUDPBox(udpBox);

            udpBox.RegistWorkThreadOperate(WorkThreadOperateLoop);
        }
Exemplo n.º 4
0
 public void RegistWorkThreadOperate(Action operateAction)
 {
     UDPBox.RegistWorkThreadOperate(operateAction);
 }