<div dir="ltr"><div class="gmail_extra">
<br><div class="gmail_quote">On 4 June 2014 13:49, Willem Toorop <span dir="ltr"><<a href="mailto:willem@nlnetlabs.nl" target="_blank">willem@nlnetlabs.nl</a>></span> wrote:<br></div><div class="gmail_quote">[snip]<br>
</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
PS. Any objections to not return a socket with axfr_start anymore? The<br>
warning was in the documentation and the socket wasn't really suitable<br>
for async processing, because ...<br></blockquote><div><br></div><div>It is now impossible to return a socket from axfr_start(), the returned Boolean value indicates if the underlying iterator object was successfully created.<br>
</div><div>The iterator object is destroyed automatically when the final RR is read.<br></div><div></div><div><br></div><div>The implementation now looks something like this:<br></div><div><br>sub axfr_start { ## historical<br>
my $self = shift;<br> my $iter = $self->{axfr_iter} = $self->axfr(@_);<br> return defined $iter;<br>}<br><br>sub axfr_next { ## historical<br> my $self = shift;<br>
my $iter = $self->{axfr_iter} || return undef;<br> $iter->() || return $self->{axfr_iter} = undef;<br>}<br><br></div><div>Willem deserves the lion's share of the credit for this brainwave.<br>
<br>
</div></div></div></div>