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.7 by root, Sat Jun 5 14:49:25 2010 UTC vs.
Revision 1.8 by root, Fri Jun 18 16:59:13 2010 UTC

113 my $self = bless { @_ }, $class; 113 my $self = bless { @_ }, $class;
114 114
115 $self->{host} ||= $ENV{FREDHOST} || "127.0.0.1"; 115 $self->{host} ||= $ENV{FREDHOST} || "127.0.0.1";
116 $self->{port} ||= $ENV{FREDPORT} || 9481; 116 $self->{port} ||= $ENV{FREDPORT} || 9481;
117 $self->{name} ||= time.rand.rand.rand; # lame 117 $self->{name} ||= time.rand.rand.rand; # lame
118 $self->{timeout} ||= 600; 118 $self->{timeout} ||= 3600*2;
119 $self->{progress} ||= sub { }; 119 $self->{progress} ||= sub { };
120 120
121 $self->{id} = "a0"; 121 $self->{id} = "a0";
122 122
123 { 123 {
125 125
126 $self->{hdl} = new AnyEvent::Handle 126 $self->{hdl} = new AnyEvent::Handle
127 connect => [$self->{host} => $self->{port}], 127 connect => [$self->{host} => $self->{port}],
128 timeout => $self->{timeout}, 128 timeout => $self->{timeout},
129 on_error => sub { 129 on_error => sub {
130 warn "<@_>\n"; 130 warn "@_\n";#d#
131 exit 1; 131 exit 1;
132 }, 132 },
133 on_read => sub { $self->on_read (@_) }, 133 on_read => sub { $self->on_read (@_) },
134 on_eof => $self->{on_eof} || sub { }; 134 on_eof => $self->{on_eof} || sub { };
135 135

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines