public static CreateGateway ( ActorSystem system, ChannelType type, string name, |
||
system | ActorSystem | |
type | ChannelType | |
name | string | |
endPoint | ||
outputSource | ||
clientInitiatorSetup | Action |
|
return |
private Server.GatewayRef CreateSecondaryGateway(ChannelType type, Action <Server.GatewayInitiator> initiatorSetup = null) { return(ChannelHelper.CreateGateway(Sys, type, "2", new IPEndPoint(_testEndPoint.Address, _testEndPoint.Port + 1), _outputSource, initiator => { initiator.TokenRequired = true; initiator.GatewayInitialized = a => { _environment.Gateway2nd = a.Cast <ActorBoundGatewayRef>(); }; initiatorSetup?.Invoke(initiator); })); }
private Server.GatewayRef CreatePrimaryGateway(ChannelType type, Action <Server.GatewayInitiator> initiatorSetup = null) { return(ChannelHelper.CreateGateway(Sys, type, "1", _testEndPoint, _outputSource, initiator => { initiator.GatewayInitialized = a => { _environment.Gateway = a.Cast <ActorBoundGatewayRef>(); }; initiator.CreateInitialActors = (IActorContext context, object socket) => new[] { Tuple.Create( context.ActorOf(Props.Create(() => new EntryActor(_environment, context.Self.Cast <ActorBoundChannelRef>()))), new TaggedType[] { typeof(IEntry) }, (ActorBindingFlags)0) }; initiatorSetup?.Invoke(initiator); })); }