ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/eg/ae2.pl
(Generate patch)

Comparing AnyEvent/eg/ae2.pl (file contents):
Revision 1.1 by root, Tue Jun 23 12:21:34 2009 UTC vs.
Revision 1.2 by root, Thu Aug 6 14:00:36 2009 UTC

1# $Id: ae2.pl,v 1.1 2009/06/23 12:21:34 root Exp $ 1# $Id: ae2.pl,v 1.2 2009/08/06 14:00:36 root Exp $
2# An echo client-server benchmark. 2# An echo client-server benchmark.
3 3
4use warnings; 4use warnings;
5use strict; 5use strict;
6 6
25}; 25};
26 26
27my $t = time; 27my $t = time;
28 28
29for my $connections (1..$CYCLES) { 29for my $connections (1..$CYCLES) {
30 my $cv = AnyEvent->condvar; 30 my $cv = AE::cv;
31 31
32 tcp_connect "127.0.0.1", $port, sub { 32 tcp_connect "127.0.0.1", $port, sub {
33 my ($fh) = @_ 33 my ($fh) = @_
34 or die "tcp_connect: $!"; 34 or die "tcp_connect: $!";
35 35

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines