Akka.IO.TcpManager.Receive C# (CSharp) Method

Receive() protected method

protected Receive ( object m ) : bool
m object
return bool
        protected override bool Receive(object m)
        {
            return WorkerForCommandHandler(message =>
            {
                var c = message as Tcp.Connect;
                if (c != null)
                {
                    var commander = Sender;
                    return registry => Props.Create(() => new TcpOutgoingConnection(_tcp, registry, commander, c));
                }
                var b = message as Tcp.Bind;
                if (b != null)
                {
                    var commander = Sender;
                    return registry => Props.Create(() => new TcpListener(SelectorPool, _tcp, registry, commander, b));
                }
                throw new ArgumentException("The supplied message type is invalid. Only Connect and Bind messages are supported.");
            })(m);
        }
    }