ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/tcp.ext
(Generate patch)

Comparing deliantra/server/ext/tcp.ext (file contents):
Revision 1.25 by root, Tue Nov 6 01:25:48 2012 UTC vs.
Revision 1.26 by root, Tue Nov 6 03:45:17 2012 UTC

15our @DETECTORS; 15our @DETECTORS;
16our %DETECTORS; 16our %DETECTORS;
17 17
18sub _update_detectors { 18sub _update_detectors {
19 $MAX_DETECT = List::Util::max map $_->[1], values %DETECTORS; 19 $MAX_DETECT = List::Util::max map $_->[1], values %DETECTORS;
20
21 use Data::Dump;
22 ddx [$MAX_DETECT, \%DETECTORS];
23} 20}
24 21
25sub register($$$$) { 22sub register($$$$) {
26 my ($name, $max_detect, $detect, $serve) = @_; 23 my ($name, $max_detect, $detect, $serve) = @_;
27 24
36 33
37our $deliantra_detector = ext::tcp::register deliantra => 10, sub { 34our $deliantra_detector = ext::tcp::register deliantra => 10, sub {
38 /^..version /s 35 /^..version /s
39}, sub { 36}, sub {
40 my $ns = cf::client::create fileno $_[1], $_[0]; 37 my $ns = cf::client::create fileno $_[1], $_[0];
38 $ns->run;
41 $ns->inbuf_append ($_[2]); 39 $ns->inbuf_append ($_[2]);
42}; 40};
43 41
44for (@$BIND_ADDRESSES) { 42for (@$BIND_ADDRESSES) {
45 my ($host, $port) = @$_; 43 my ($host, $port) = @$_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines