renamed module to AnyEvent::HTTPD
[AnyEvent-HTTPD.git] / lib / AnyEvent / HTTPD / HTTPServer.pm
blob1b895f13bd64528f16b0836d4ddbd3b67fbbc8fd
1 package AnyEvent::HTTPD::HTTPServer;
2 use feature ':5.10';
3 use strict;
4 no warnings;
6 use AnyEvent::HTTPD::TCPListener;
7 use AnyEvent::HTTPD::HTTPConnection;
9 =head1 NAME
11 AnyEvent::HTTPD::HTTPServer - A simple and plain http server
13 =head1 DESCRIPTION
15 This class handles incoming TCP connections for HTTP clients.
16 It's used by L<AnyEvent::HTTPD> to do it's job.
18 It has no public interface yet.
20 =head1 COPYRIGHT & LICENSE
22 Copyright 2008 Robin Redeker, all rights reserved.
24 This program is free software; you can redistribute it and/or modify it
25 under the same terms as Perl itself.
27 =cut
29 our @ISA = qw/AnyEvent::HTTPD::TCPListener/;
31 sub new {
32 my $this = shift;
33 my $class = ref($this) || $this;
34 my $self = $class->SUPER::new (@_);
36 $self->reg_cb (
37 connect => sub {
38 my ($list, $cl) = @_;
40 disconnect => sub {
41 my ($list, $cl) = @_;
45 return $self
48 sub connection_class { 'AnyEvent::HTTPD::HTTPConnection' }