Help for this page
$sock->timeout(60);
while ( 1 ) { while (my $r = $sock->accept) { # process ... warn "Server runs on a timeout" } }