/[cvs]/joko/TestArea/perl/runtime/POE/net/server_http.pl
ViewVC logotype

Annotation of /joko/TestArea/perl/runtime/POE/net/server_http.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sun May 11 21:48:54 2003 UTC (21 years, 6 months ago) by joko
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
initial commit

1 joko 1.1 #use POE::Component::Server::HTTP;
2     use POE qw(Component::Server::HTTP);
3     use HTTP::Status;
4    
5     sub handler {
6     my ($request, $response) = @_;
7     $response->code(RC_OK);
8     $response->content("Hi, you fetched ". $request->uri);
9     return RC_OK;
10     }
11    
12     POE::Component::Server::HTTP->new(
13     Port => 8000,
14     ContentHandler => { '/' => \&handler },
15     Headers => { Server => 'My Server' },
16     );
17    
18    
19     $poe_kernel->run();

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed