protected HeliosTransport(ActorSystem system, Config config)
 {
     Config   = config;
     System   = system;
     Settings = new HeliosTransportSettings(config);
     Log      = Logging.GetLogger(System, GetType());
     Executor = new TryCatchExecutor(exception => Log.Error(exception, "Unknown network error"));
 }
Exemple #2
0
 protected HeliosTransport(ActorSystem system, Config config)
 {
     Config   = config;
     System   = system;
     Settings = new HeliosTransportSettings(config);
     Log      = Logging.GetLogger(System, GetType());
     _serverEventLoopGroup = new MultithreadEventLoopGroup(Settings.ServerSocketWorkerPoolSize);
     _clientEventLoopGroup = new MultithreadEventLoopGroup(Settings.ClientSocketWorkerPoolSize);
 }
        /// <summary>
        /// TBD
        /// </summary>
        /// <param name="system">TBD</param>
        /// <param name="config">TBD</param>
        /// <param name="fallbackConfigPath">TBD</param>
        protected HeliosTransport(ActorSystem system, Config config, string fallbackConfigPath)
        {
            Config = config;
            System = system;
            var fallbackConfig = DefaultConfig();

            Settings = new HeliosTransportSettings(config.WithFallback(fallbackConfig.GetConfig(fallbackConfigPath)));
            Log      = Logging.GetLogger(System, GetType());
            _serverEventLoopGroup = new MultithreadEventLoopGroup(Settings.ServerSocketWorkerPoolSize);
            _clientEventLoopGroup = new MultithreadEventLoopGroup(Settings.ClientSocketWorkerPoolSize);
        }
        public void Remoting_should_contain_correct_heliosTCP_values_in_ReferenceConf()
        {
            var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.helios.tcp");
            var s = new HeliosTransportSettings(c);

            Assert.Equal(TimeSpan.FromSeconds(15), s.ConnectTimeout);
            Assert.Null(s.WriteBufferHighWaterMark);
            Assert.Null(s.WriteBufferLowWaterMark);
            Assert.Equal(256000, s.SendBufferSize.Value);
            Assert.Equal(256000, s.ReceiveBufferSize.Value);
            Assert.Equal(128000, s.MaxFrameSize);
            Assert.Equal(4096, s.Backlog);
            Assert.True(s.TcpNoDelay);
            Assert.True(s.TcpKeepAlive);
            Assert.True(s.TcpReuseAddr);
            Assert.True(string.IsNullOrEmpty(c.GetString("hostname")));
            Assert.Equal(2, s.ServerSocketWorkerPoolSize);
            Assert.Equal(2, s.ClientSocketWorkerPoolSize);
        }
Exemple #5
0
 protected HeliosTransport(ActorSystem system, Config config)
 {
     Config = config;
     System = system;
     Settings = new HeliosTransportSettings(config);
     Log = Logging.GetLogger(System, GetType());
     Executor = new TryCatchExecutor(exception => Log.Error(exception, "Unknown network error"));
 }
 protected HeliosTransport(ActorSystem system, Config config)
 {
     Config = config;
     System = system;
     Settings = new HeliosTransportSettings(config);
     Log = Logging.GetLogger(System, GetType());
     _serverEventLoopGroup = new MultithreadEventLoopGroup(Settings.ServerSocketWorkerPoolSize);
     _clientEventLoopGroup = new MultithreadEventLoopGroup(Settings.ClientSocketWorkerPoolSize);
 }
        public void Remoting_should_contain_correct_hostname_values_in_ReferenceConf()
        {
           var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.helios.tcp");
           var s = new HeliosTransportSettings(c);

           //Non-specified hostnames should default to IPAddress.Any
           Assert.Equal(IPAddress.Any.ToString(), s.Hostname);
           Assert.Equal(IPAddress.Any.ToString(), s.PublicHostname);
      }
        public void When_remoting_works_not_in_Mono_ip_enforcement_should_be_defaulted_to_false()
        {
            if (IsMono) return; // skip IF using Mono
            var c = ((RemoteActorRefProvider)((ActorSystemImpl)Sys).Provider).RemoteSettings.Config.GetConfig("akka.remote.helios.tcp");
            var s = new HeliosTransportSettings(c);

            Assert.False(s.EnforceIpFamily);
        }