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

Comparing AnyEvent-FCP/FCP.pm (file contents):
Revision 1.23 by root, Sun Jun 12 04:39:41 2016 UTC vs.
Revision 1.24 by root, Sun Jun 12 04:44:05 2016 UTC

737 }); 737 });
738}; 738};
739 739
740=item $status = $fcp->remove_request ($identifier[, $global]) 740=item $status = $fcp->remove_request ($identifier[, $global])
741 741
742Remove the request with the given isdentifier. Returns true if successful, 742Remove the request with the given identifier. Returns true if successful,
743false on error. 743false on error.
744 744
745=cut 745=cut
746 746
747_txn remove_request => sub { 747_txn remove_request => sub {
792 792
793C<$want_read> and C<$want_write> should be set to a true value when you 793C<$want_read> and C<$want_write> should be set to a true value when you
794want to read (get) files or write (put) files, respectively. 794want to read (get) files or write (put) files, respectively.
795 795
796On error, an exception is thrown. Otherwise, C<$can_read> and 796On error, an exception is thrown. Otherwise, C<$can_read> and
797C<$can_write> indicate whether you can reaqd or write to freenet via the 797C<$can_write> indicate whether you can read or write to freenet via the
798directory. 798directory.
799 799
800=cut 800=cut
801 801
802_txn test_dda => sub { 802_txn test_dda => sub {
923on every change, which will be called as C<< $cb->($fcp, $kv, $type) >>, where C<$type> 923on every change, which will be called as C<< $cb->($fcp, $kv, $type) >>, where C<$type>
924is the type of the original message triggering the change, 924is the type of the original message triggering the change,
925 925
926To fill this cache with the global queue and keep it updated, 926To fill this cache with the global queue and keep it updated,
927call C<watch_global> to subscribe to updates, followed by 927call C<watch_global> to subscribe to updates, followed by
928C<list_persistent_requests_sync>. 928C<list_persistent_requests>.
929 929
930 $fcp->watch_global_sync_; # do not wait 930 $fcp->watch_global_; # do not wait
931 $fcp->list_persistent_requests; # wait 931 $fcp->list_persistent_requests; # wait
932 932
933To get a better idea of what is stored in the cache, here is an example of 933To get a better idea of what is stored in the cache, here is an example of
934what might be stored in C<< $fcp->{req}{"Frost-gpl.txt"} >>: 934what might be stored in C<< $fcp->{req}{"Frost-gpl.txt"} >>:
935 935
1044 if 0.1 > rand; 1044 if 0.1 > rand;
1045 } 1045 }
1046 } 1046 }
1047 1047
1048 # see if the dummy plugin is loaded, to ensure all previous requests have finished. 1048 # see if the dummy plugin is loaded, to ensure all previous requests have finished.
1049 $fcp->get_plugin_info_sync ("dummy"); 1049 $fcp->get_plugin_info ("dummy");
1050 1050
1051=head1 SEE ALSO 1051=head1 SEE ALSO
1052 1052
1053L<http://wiki.freenetproject.org/FreenetFCPSpec2Point0>, L<Net::FCP>. 1053L<http://wiki.freenetproject.org/FreenetFCPSpec2Point0>, L<Net::FCP>.
1054 1054

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines