# legacy
require IO::Socket::INET;
-require IO::Socket::UNIX if ($^O ne 'epoc');
+require IO::Socket::UNIX if ($^O ne 'epoc' && $^O ne 'symbian');
@ISA = qw(IO::Handle);
-$VERSION = "1.27";
+$VERSION = "1.28";
@EXPORT_OK = qw(sockatmark);
? send($sock, $_[1], $flags)
: send($sock, $_[1], $flags, $peer);
- # remember who we send to, if it was sucessful
+ # remember who we send to, if it was successful
${*$sock}{'io_socket_peername'} = $peer
if(@_ == 4 && defined $r);
sub timeout {
@_ == 1 || @_ == 2 or croak 'usage: $sock->timeout([VALUE])';
my($sock,$val) = @_;
- my $r = ${*$sock}{'io_socket_timeout'} || undef;
+ my $r = ${*$sock}{'io_socket_timeout'};
- ${*$sock}{'io_socket_timeout'} = 0 + $val
+ ${*$sock}{'io_socket_timeout'} = defined $val ? 0 + $val : $val
if(@_ == 2);
$r;
=item connected
-If the socket is in a connected state the the peer address is returned.
+If the socket is in a connected state the peer address is returned.
If the socket is not in a connected state then undef will be returned.
=item protocol