ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Socket.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Socket.pm (file contents):
Revision 1.18 by root, Sat May 24 18:50:40 2008 UTC vs.
Revision 1.19 by root, Sat May 24 18:52:10 2008 UTC

9 tcp_connect "gameserver.deliantra.net", 13327, sub { 9 tcp_connect "gameserver.deliantra.net", 13327, sub {
10 my ($fh) = @_ 10 my ($fh) = @_
11 or die "gameserver.deliantra.net connect failed: $!"; 11 or die "gameserver.deliantra.net connect failed: $!";
12 12
13 # enjoy your filehandle 13 # enjoy your filehandle
14 };
15
16 # a simple tcp server
17 tcp_server undef, 8888, sub {
18 my ($fh, $host, $port) = @_;
19
20 syswrite $fh, "The internet is full, $host:$port. Go away!\015\012";
14 }; 21 };
15 22
16=head1 DESCRIPTION 23=head1 DESCRIPTION
17 24
18This module implements various utility functions for handling internet 25This module implements various utility functions for handling internet

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines