protected void IdleBehavior()
{
Receive<IsIdle>(idle => Sender.Tell(Idle.Instance));
Receive<EndpointManager.Send>(send =>
{
_writer = CreateWriter();
//Resending will be triggered by the incoming GotUid message after the connection finished
HandleSend(send);
GoToActive();
});
Receive<AttemptSysMsgRedelivery>(sys =>
{
if (_resendBuffer.Nacked.Any() || _resendBuffer.NonAcked.Any())
{
_writer = CreateWriter();
//Resending will be triggered by the incoming GotUid message after the connection finished
GoToActive();
}
});
Receive<TooLongIdle>(idle =>
{
HandleTooLongIdle();
});
Receive<EndpointWriter.FlushAndStop>(stop => Context.Stop(Self));
Receive<EndpointWriter.StopReading>(stop => stop.ReplyTo.Tell(new EndpointWriter.StoppedReading(stop.Writer)));
}