public TcpIncomingConnection(TcpExt tcp, SocketChannel channel, IChannelRegistry registry, IActorRef bindHandler, IEnumerable<Inet.SocketOption> options, bool readThrottling) : base(tcp, channel, readThrottling) { _bindHandler = bindHandler; _options = options; Context.Watch(bindHandler); // sign death pact registry.Register(channel, SocketAsyncOperation.None, Self); }
public TcpOutgoingConnection(TcpExt tcp, IChannelRegistry channelRegistry, IActorRef commander, Tcp.Connect connect) : base(tcp, SocketChannel.Open().ConfigureBlocking(false), connect.PullMode) { _channelRegistry = channelRegistry; _commander = commander; _connect = connect; Context.Watch(commander); // sign death pact connect.Options.ForEach(_ => _.BeforeConnect(Channel.Socket)); if (connect.LocalAddress != null) Channel.Socket.Bind(connect.LocalAddress); channelRegistry.Register(Channel, SocketAsyncOperation.None, Self); if (connect.Timeout.HasValue) Context.SetReceiveTimeout(connect.Timeout.Value); //Initiate connection timeout if supplied }
public TestTcpOutgoingConnection(TcpExt tcp, IChannelRegistry channelRegistry, IActorRef commander, Tcp.Connect connect) : base(tcp, channelRegistry, commander, connect) { }
public TcpManager(TcpExt tcp) : base(tcp.Settings, tcp.Settings.NrOfSelectors) { _tcp = tcp; }