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

Comparing Coro/Event/Socket.pm (file contents):
Revision 1.13 by root, Thu Nov 21 13:08:06 2002 UTC vs.
Revision 1.14 by root, Mon Dec 23 19:30:36 2002 UTC

50 }; 50 };
51} 51}
52 52
53sub _sa($$$) { 53sub _sa($$$) {
54 my ($host, $port, $proto) = @_; 54 my ($host, $port, $proto) = @_;
55 $port or $host =~ s/:([^:]+)$// and $port = $1;
55 my $_proto = _proto($proto); 56 my $_proto = _proto($proto);
56 my $_port = _port($port, $proto); 57 my $_port = _port($port, $proto);
57 58
58 # optimize this a bit for a common case 59 # optimize this a bit for a common case
59 if ($host =~ /^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9][0-9]?) 60 if ($host =~ /^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9][0-9]?)
77If the host is unreachable or otherwise cannot be connected to this method 78If the host is unreachable or otherwise cannot be connected to this method
78returns undef. On all other errors ot croak's. 79returns undef. On all other errors ot croak's.
79 80
80Multihomed is always enabled. 81Multihomed is always enabled.
81 82
82 $fh = new_inet Coro::Socket PeerHost => "localhost", PeerPort => 'finger'; 83 $fh = new Coro::Socket PeerHost => "localhost", PeerPort => 'finger';
83 84
84=cut 85=cut
85 86
86sub _prepare_socket { 87sub _prepare_socket {
87 my ($class, $arg) = @_; 88 my ($class, $arg) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines