--- deliantra/server/ext/tcp.ext 2006/12/15 19:29:18 1.1 +++ deliantra/server/ext/tcp.ext 2007/11/24 05:57:09 1.9 @@ -10,15 +10,16 @@ our $LISTEN = new IO::Socket::INET LocalPort => cf::settings->csport, Listen => 1, + Blocking => 0, ReuseAddr => 1; if (!$LISTEN) { # extension yes, completely stupid, not yet - warn "unable to establish listen sockect, exiting.\n"; + warn "unable to establish listen socket, exiting.\n"; exit (2); } -Event->io (fd => $LISTEN, poll => 'r', data => cf::WF_AUTOCANCEL, cb => sub { +our $LISTENER = EV::io $LISTEN, EV::READ, sub { my ($fh, $peername) = $LISTEN->accept or return; @@ -27,5 +28,6 @@ warn "new connection from $host\n"; - cf::add_client_socket $fd, $host; -}); + cf::client::create $fd, $host; +}; +