ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.188 by root, Thu Sep 17 08:20:14 2009 UTC vs.
Revision 1.190 by root, Thu Nov 26 10:30:24 2009 UTC

710 710
711Replace the current C<on_stoptls> callback (see the C<on_stoptls> constructor argument). 711Replace the current C<on_stoptls> callback (see the C<on_stoptls> constructor argument).
712 712
713=cut 713=cut
714 714
715sub on_starttls { 715sub on_stoptls {
716 $_[0]{on_stoptls} = $_[1]; 716 $_[0]{on_stoptls} = $_[1];
717} 717}
718 718
719=item $handle->rbuf_max ($max_octets) 719=item $handle->rbuf_max ($max_octets)
720 720
903 @_ = ($WH{$type} ||= _load_func "$type\::anyevent_write_type" 903 @_ = ($WH{$type} ||= _load_func "$type\::anyevent_write_type"
904 or Carp::croak "unsupported/unloadable type '$type' passed to AnyEvent::Handle::push_write") 904 or Carp::croak "unsupported/unloadable type '$type' passed to AnyEvent::Handle::push_write")
905 ->($self, @_); 905 ->($self, @_);
906 } 906 }
907 907
908 # we downgrade here to avoid hard-to-track-down bugs,
909 # and diagnose the problem earlier and better.
910
908 if ($self->{tls}) { 911 if ($self->{tls}) {
909 $self->{_tls_wbuf} .= $_[0]; 912 utf8::downgrade $self->{_tls_wbuf} .= $_[0];
910 &_dotls ($self) if $self->{fh}; 913 &_dotls ($self) if $self->{fh};
911 } else { 914 } else {
912 $self->{wbuf} .= $_[0]; 915 utf8::downgrade $self->{wbuf} .= $_[0];
913 $self->_drain_wbuf if $self->{fh}; 916 $self->_drain_wbuf if $self->{fh};
914 } 917 }
915} 918}
916 919
917=item $handle->push_write (type => @args) 920=item $handle->push_write (type => @args)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines