示例#1
0
 public IP_ObjectAsyncResult(IP_Object n, bool compSync, bool isComp)
 {
     AsyncState      = (Object)n;
     AsyncWaitHandle = null;
     //			CompletedSynchronously = compSync;
     //			IsCompleted = isComp;
 }
示例#2
0
 public IP_ObjectAsyncResult(IP_Object n, bool compSync, bool isComp)
 {
     AsyncState = (Object)n;
     AsyncWaitHandle = null;
     //			CompletedSynchronously = compSync;
     //			IsCompleted = isComp;
 }
示例#3
0
        void processFindSuccessorForFindSuccessor(IAsyncResult result)
        {
            Console.WriteLine("ChordServer::processFindSuccessorForFindSuccessor ENTER");

            ChordCommon.IChordNode_Object iNode_Object = (ChordCommon.IChordNode_Object)(result.AsyncState);
            IChordNode successor = iNode_Object.node;
            IPAddress  IP        = successor.getIP();

            Stack <Object> recAppState           = (Stack <Object>)(iNode_Object.obj);
            Object         origAppState          = recAppState.Pop();
            AsyncCallback  findSuccessorCallBack = (AsyncCallback)(recAppState.Pop());

            if (findSuccessorCallBack != null)
            {
                ChordCommon.IP_Object _IP_Object = new ChordCommon.IP_Object();

                _IP_Object.IP  = IP;
                _IP_Object.obj = origAppState;

                IAsyncResult res = new ChordCommon.IP_ObjectAsyncResult(_IP_Object, true, true);
                findSuccessorCallBack(res);
            }
        }
示例#4
0
        void processFindSuccessorForFindSuccessor(IAsyncResult result)
        {
            Console.WriteLine("ChordServer::processFindSuccessorForFindSuccessor ENTER");

            ChordCommon.IChordNode_Object iNode_Object = (ChordCommon.IChordNode_Object)(result.AsyncState);
            IChordNode successor = iNode_Object.node;
            IPAddress IP = successor.getIP();

            Stack<Object> recAppState = (Stack<Object>)(iNode_Object.obj);
            Object origAppState = recAppState.Pop();
            AsyncCallback findSuccessorCallBack = (AsyncCallback)(recAppState.Pop());

            if (findSuccessorCallBack != null)
            {
                ChordCommon.IP_Object _IP_Object = new ChordCommon.IP_Object();

                _IP_Object.IP = IP;
                _IP_Object.obj = origAppState;

                IAsyncResult res = new ChordCommon.IP_ObjectAsyncResult(_IP_Object, true, true);
                findSuccessorCallBack(res);
            }
        }