public UdpConnectedExt(ExtendedActorSystem system, UdpSettings settings) { var bufferPoolConfig = system.Settings.Config.GetConfig(settings.BufferPoolConfigPath); if (bufferPoolConfig.IsNullOrEmpty()) { throw new ConfigurationException($"Cannot retrieve UDP buffer pool configuration: {settings.BufferPoolConfigPath} configuration node not found"); } Settings = settings; BufferPool = CreateBufferPool(system, bufferPoolConfig); SocketEventArgsPool = new PreallocatedSocketEventAgrsPool(Settings.InitialSocketAsyncEventArgs, OnComplete); Manager = system.SystemActorOf( props: Props.Create(() => new UdpConnectedManager(this)).WithDeploy(Deploy.Local), name: "IO-UDP-CONN"); }
public UdpConnectedExt(ExtendedActorSystem system, UdpSettings settings) { var bufferPoolConfig = system.Settings.Config.GetConfig(settings.BufferPoolConfigPath); if (bufferPoolConfig == null) { throw new ArgumentNullException(nameof(settings), $"Couldn't find a HOCON config for `{settings.BufferPoolConfigPath}`"); } Settings = settings; BufferPool = CreateBufferPool(system, bufferPoolConfig); SocketEventArgsPool = new PreallocatedSocketEventAgrsPool(Settings.InitialSocketAsyncEventArgs, OnComplete); Manager = system.SystemActorOf( props: Props.Create(() => new UdpConnectedManager(this)).WithDeploy(Deploy.Local), name: "IO-UDP-CONN"); }
internal TcpExt(ExtendedActorSystem system, TcpSettings settings) { var bufferPoolConfig = system.Settings.Config.GetConfig(settings.BufferPoolConfigPath); if (bufferPoolConfig == null) { throw new ArgumentNullException(nameof(settings), $"Couldn't find a HOCON config for `{settings.BufferPoolConfigPath}`"); } Settings = settings; FileIoDispatcher = system.Dispatchers.Lookup(Settings.FileIODispatcher); BufferPool = CreateBufferPool(system, bufferPoolConfig); SocketEventArgsPool = new PreallocatedSocketEventAgrsPool(settings.InitialSocketAsyncEventArgs, OnComplete); Manager = system.SystemActorOf( props: Props.Create(() => new TcpManager(this)).WithDispatcher(Settings.ManagementDispatcher).WithDeploy(Deploy.Local), name: "IO-TCP"); }