Akka.Interfaced.SlimSocket.Server.UdpChannel.PreStart C# (CSharp) Method

PreStart() protected method

protected PreStart ( ) : void
return void
        protected override void PreStart()
        {
            base.PreStart();

            _self = Self;
            _eventStream = Context.System.EventStream;

            // create initial actors and bind them

            if (_initiator.CreateInitialActors != null)
            {
                var actors = _initiator.CreateInitialActors(Context, _connection);
                if (actors != null)
                {
                    foreach (var actor in actors)
                    {
                        BindActor(actor.Item1, actor.Item2.Select(t => new BoundType(t)));
                    }
                }
            }

            // accept it

            _connection.MessageHandler = OnConnectionMessage;
            _connection.Approve();
        }