- my $self = shift;
-
- my $sock = $self->sock || die "no sock?";
-
-# die "not IO::Socket::INET but ", ref( $sock ) unless ( ref($sock) eq 'Net::Server::Proto::TCP' );
-
- if ( ! $sock->connected ) {
- warn "SOCKET NOT CONNECTED\n";
- return 0;
- }
-
- bless $sock, 'HTTP::Daemon::ClientConn';
-
- # why do I have to do this?
- # solution from http://use.perl.org/~Matts/journal/12896
- ${*$sock}{'httpd_daemon'} = HTTP::Daemon->new;
-
- my $r = $sock->get_request || confess "can't get_request";
-
- my $chunk = $r->content;
-
- my $size = length( $chunk );