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

Comparing cvsroot/Coro/myhttpd/access.pl (file contents):
Revision 1.27 by root, Wed Dec 5 02:02:23 2001 UTC vs.
Revision 1.28 by root, Thu Jan 3 01:20:17 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 => $_[0], 12 slots => 1,
13 maxsize => 0,
13 lastspb => 0, 14 lastspb => 0,
14 avgspb => 0, 15 avgspb => 0,
16 @_,
15 }, $class; 17 }, $class;
16 $self->{reschedule} = Event->timer( 18 $self->{reschedule} = Event->timer(
17 after => 10, 19 after => 10,
18 interval => 3, 20 interval => 3,
19 cb => sub { $self->wake_next }, 21 cb => sub { $self->wake_next },
22} 24}
23 25
24sub start_transfer { 26sub start_transfer {
25 my $self = shift; 27 my $self = shift;
26 my $size = $_[0]; 28 my $size = $_[0];
29
30 if ($self->{maxsize} && $self->{maxsize} < $size) {
31 $size = $self->{maxsize};
32 }
27 33
28 my $transfer = bless { 34 my $transfer = bless {
29 queue => $self, 35 queue => $self,
30 time => $::NOW, 36 time => $::NOW,
31 size => $size, 37 size => $size,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines