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.52 by root, Mon Jun 2 09:10:38 2008 UTC vs.
Revision 1.53 by root, Mon Jun 2 09:12:14 2008 UTC

520 520
521 $self->{json} ? $self->{json}->encode ($ref) 521 $self->{json} ? $self->{json}->encode ($ref)
522 : JSON::encode_json ($ref) 522 : JSON::encode_json ($ref)
523}; 523};
524 524
525=back
526
525=item AnyEvent::Handle::register_write_type type => $coderef->($handle, @args) 527=item AnyEvent::Handle::register_write_type type => $coderef->($handle, @args)
526 528
527This function (not method) lets you add your own types to C<push_write>. 529This function (not method) lets you add your own types to C<push_write>.
528Whenever the given C<type> is used, C<push_write> will invoke the code 530Whenever the given C<type> is used, C<push_write> will invoke the code
529reference with the handle object and the remaining arguments. 531reference with the handle object and the remaining arguments.
531The code reference is supposed to return a single octet string that will 533The code reference is supposed to return a single octet string that will
532be appended to the write buffer. 534be appended to the write buffer.
533 535
534Note that this is a function, and all types registered this way will be 536Note that this is a function, and all types registered this way will be
535global, so try to use unique names. 537global, so try to use unique names.
536
537=back
538 538
539=cut 539=cut
540 540
541############################################################################# 541#############################################################################
542 542

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines