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 FailedRegisterIncoming(SocketChannel channel) { Channel = channel; }
internal SocketChannel AcceptServerSideChannel(SocketChannel localServer) { var promise = new TaskCompletionSource<Socket>(); var task = promise.Task; localServer.Socket.Listen(100); localServer.Socket.BeginAccept(ar => promise.SetResult(localServer.Socket.EndAccept(ar)), null); Selector.Send(ConnectionActor, SelectionHandler.ChannelConnectable.Instance); task.Wait(); var channel = new SocketChannel(task.Result); channel.Register(ChannelProbe, SocketAsyncOperation.None); return channel; }
public Registration(SocketChannel channel, SocketAsyncOperation? initialOps) { Channel = channel; InitialOps = initialOps; }
public void Register(SocketChannel channel, SocketAsyncOperation? initialOps, IActorRef channelActor) { channel.Register(channelActor, initialOps); RegisterCallReceiver.Ref.Tell(new TcpConnectionSpec.Registration(channel, initialOps)); }
public void AbortClose(SocketChannel channel) { // TODO: Do we need to handle expection like JVM? channel.Socket.LingerState = new LingerOption(true, 0); channel.Close(); }
public void Register(SocketChannel channel, SocketAsyncOperation? initialOps, IActorRef channelActor) { _test._registerCallReceiver.Ref.Tell(initialOps, channelActor); }