Permalink
Browse files

[HTTP::Daemon] moved over to Rakudo's sockets

  • Loading branch information...
1 parent c426aaa commit dd25d2dae25ed7c0337a4f7996e9bd80144b71ac @masak committed Apr 19, 2009
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/HTTP/Daemon.pm
View
@@ -213,11 +213,9 @@ class HTTP::Daemon
my %callerns := Q:PIR {{ $P0 = getinterp
%r = $P0['namespace';1] }};
- # Ew... we need a Socket.pm in rakudo
- my $listener := Q:PIR {{ %r = new 'Socket' }};
- $listener.socket(2,1,6);
- $listener.bind($listener.sockaddr($.host, $.port));
- $listener.listen(1);
+ my $listener = IO::Socket::INET.socket(2, 1, 6)\
+ .bind($.host, $.port)\
+ .listen();
while $!running {
my $work = $listener.accept();
my HTTP::Daemon::ClientConn $c .= new( :socket($work) );

0 comments on commit dd25d2d

Please sign in to comment.