sub accept_connection { my $self = shift; my $sock = $self->{_listener}->accept; $self->{_selector}->add($sock); my $key = refaddr($sock); $self->{$key} = { fh => $sock, buf => '' }; $sock->write(qq{200 READY\x0A}); }