예제 #1
0
 public FindResponsesSendAsyncResult(
     ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult,
     AsyncCallback callback,
     object state)
     : base(
         probeDuplexAsyncResult.context.MaxResponseDelay,
         probeDuplexAsyncResult.findRequest.MatchingEndpoints,
         callback,
         state)
 {
     this.probeDuplexAsyncResult = probeDuplexAsyncResult;
     this.Start(this.probeDuplexAsyncResult.timeoutHelper.RemainingTime());
 }
예제 #2
0
 static void OnFindCompleted(IAsyncResult result)
 {
     if (result.CompletedSynchronously)
     {
         return;
     }
     else
     {
         ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr =
             (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState;
         thisPtr.FinishFind(result);
     }
 }
예제 #3
0
        static bool OnSendFindResponsesCompleted(IAsyncResult result)
        {
            FindResponsesSendAsyncResult.End(result);

            ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr =
                (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState;

            if (thisPtr.findException != null)
            {
                throw FxTrace.Exception.AsError(thisPtr.findException);
            }

            return(true);
        }
예제 #4
0
 public ProxyAnnouncementsSendAsyncResult(
     ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult,
     Collection <EndpointDiscoveryMetadata> redirectionEndpoints,
     AsyncCallback callback,
     object state)
     : base(
         redirectionEndpoints.Count,
         probeDuplexAsyncResult.context.MaxResponseDelay,
         callback,
         state)
 {
     this.probeDuplexAsyncResult = probeDuplexAsyncResult;
     this.redirectionEndpoints   = redirectionEndpoints;
     this.Start(this.probeDuplexAsyncResult.timeoutHelper.RemainingTime());
 }
예제 #5
0
        static bool OnShouldRedirectFindCompleted(IAsyncResult result)
        {
            Collection <EndpointDiscoveryMetadata> redirectionEndpoints = null;

            ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> thisPtr =
                (ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel>)result.AsyncState;

            if (thisPtr.multicastSuppressionImpl.EndShouldRedirectFind(result, out redirectionEndpoints))
            {
                return(thisPtr.SendProxyAnnouncements(redirectionEndpoints));
            }
            else
            {
                return(thisPtr.ProcessFindRequest());
            }
        }
예제 #6
0
 public DuplexFindContext(FindCriteria criteria, ProbeDuplexAsyncResult <TProbeMessage, TResponseChannel> probeDuplexAsyncResult)
     : base(criteria)
 {
     this.matchingEndpoints      = new InputQueue <EndpointDiscoveryMetadata>();
     this.probeDuplexAsyncResult = probeDuplexAsyncResult;
 }