Akka.Interfaced.SlimServer.ActorBoundGatewayRef.WithTimeout C# (CSharp) Метод

WithTimeout() публичный Метод

public WithTimeout ( System.TimeSpan timeout ) : ActorBoundGatewayRef
timeout System.TimeSpan
Результат ActorBoundGatewayRef
        public ActorBoundGatewayRef WithTimeout(TimeSpan? timeout)
        {
            return new ActorBoundGatewayRef(Target, RequestWaiter, timeout);
        }

Usage Example

Пример #1
0
 public static async Task <IRequestTarget> BindActorOrOpenChannel(
     this ActorBoundChannelRef channel, IActorRef actor, TaggedType[] types, ActorBindingFlags bindingFlags,
     string gatewayName, object tag, ActorBindingFlags bindingFlagsForOpenChannel)
 {
     if (string.IsNullOrEmpty(gatewayName) || (channel != null && channel.CastToIActorRef().Path.Address == actor.Path.Address))
     {
         // link an actor to channel directly
         return(await channel.BindActor(actor, types, bindingFlags));
     }
     else
     {
         // grant client to access an actor via gateway
         var gatewayRef = ((InternalActorRefBase)actor).Provider.ResolveActorRef(actor.Path.Root / "user" / gatewayName);
         var gateway    = new ActorBoundGatewayRef(new AkkaReceiverTarget(gatewayRef));
         return(await gateway.WithTimeout(TimeSpan.FromSeconds(10)).OpenChannel(actor, types, tag, bindingFlagsForOpenChannel));
     }
 }
All Usage Examples Of Akka.Interfaced.SlimServer.ActorBoundGatewayRef::WithTimeout