ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/access.pl
(Generate patch)

Comparing Coro/myhttpd/access.pl (file contents):
Revision 1.28 by root, Thu Jan 3 01:20:17 2002 UTC vs.
Revision 1.29 by root, Wed Jan 23 03:07:05 2002 UTC

7); 7);
8 8
9sub new { 9sub new {
10 my $class = shift; 10 my $class = shift;
11 my $self = bless { 11 my $self = bless {
12 slots => 1, 12 slots => $_[0],
13 maxsize => 0,
14 lastspb => 0, 13 lastspb => 0,
15 avgspb => 0, 14 avgspb => 0,
16 @_,
17 }, $class; 15 }, $class;
18 $self->{reschedule} = Event->timer( 16 $self->{reschedule} = Event->timer(
19 after => 10, 17 after => 10,
20 interval => 3, 18 interval => 3,
21 cb => sub { $self->wake_next }, 19 cb => sub { $self->wake_next },
24} 22}
25 23
26sub start_transfer { 24sub start_transfer {
27 my $self = shift; 25 my $self = shift;
28 my $size = $_[0]; 26 my $size = $_[0];
29
30 if ($self->{maxsize} && $self->{maxsize} < $size) {
31 $size = $self->{maxsize};
32 }
33 27
34 my $transfer = bless { 28 my $transfer = bless {
35 queue => $self, 29 queue => $self,
36 time => $::NOW, 30 time => $::NOW,
37 size => $size, 31 size => $size,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines