™.. IO::Socket::INET6 - Online Linux Manual PageSection : 3
Updated : 2008-10-06
Source : perl v5.10.1
Note : User Contributed Perl Documentation

NAMEIO::Socket::INET6 − Object interface for AF_INET|AF_INET6 domain sockets

SYNOPSIS​ use IO::Socket::INET6;

DESCRIPTION\*(C`IO::Socket::INET6\*(C'\fR provides an object interface to creating and using sockets in either AF_INET or AF_INET6 domains. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket.

CONSTRUCTORnew ( [ARGS] ) Creates an \*(C`IO::Socket::INET6\*(C'\fR object, which is a reference to a newly created symbol (see the \*(C`Symbol\*(C'\fR package). \f(CW\*(C`new\*(C'\fR optionally takes arguments, these arguments are in key-value pairs. In addition to the key-value pairs accepted by IO::Socket, ​\*(C`IO::Socket::INET6\*(C'\fR provides. ​ Domain Address family AF_INET | AF_INET6 | AF_UNSPEC (default) ​ PeerAddr Remote host address <hostname>[:<port>] ​ PeerHost Synonym for PeerAddr ​ PeerPort Remote port or service <service>[(<no>)] | <no> ​ PeerFlow Remote flow information ​ PeerScope Remote address scope ​ LocalAddr Local host bind address hostname[:port] ​ LocalHost Synonym for LocalAddr ​ LocalPort Local host bind port <service>[(<no>)] | <no> ​ LocalFlow Local host flow information ​ LocalScope Local host address scope ​ Proto Protocol name (or number) "tcp" | "udp" | ... ​ Type Socket type SOCK_STREAM | SOCK_DGRAM | ... ​ Listen Queue size for listen ​ ReuseAddr Set SO_REUSEADDR before binding ​ Reuse Set SO_REUSEADDR before binding (deprecated, prefer ReuseAddr) ​ ReusePort Set SO_REUSEPORT before binding ​ Broadcast Set SO_BROADCAST before binding ​ Timeout Timeout value for various operations ​ MultiHomed Try all adresses for multi−homed hosts ​ Blocking Determine if connection will be blocking mode If \*(C`Listen\*(C'\fR is defined then a listen socket is created, else if the socket type, which is derived from the protocol, is SOCK_STREAM then ​connect() is called. Although it is not illegal, the use of \*(C`MultiHomed\*(C'\fR on a socket which is in non-blocking mode is of little use. This is because the first connect will never fail with a timeout as the connect call will not block. The \*(C`PeerAddr\*(C'\fR can be a hostname, the IPv6\-address on the ​2001:800:40:2a05::10 form , or the IPv4−address on the 213.34.234.245 form. The \*(C`PeerPort\*(C'\fR can be a number or a symbolic service name. The service name might be followed by a number in parenthesis which is used if the service is not known by the system. The \*(C`PeerPort\*(C'\fR specification can also be embedded in the \f(CW\*(C`PeerAddr\*(C'\fR by preceding it with a :, and closing the IPv6 address on bracktes [] if necessary: 124.678.12.34:23,[2a05:345f::10]:23,any.server.com:23. If \*(C`Domain\*(C'\fR is not given, \s-1AF_UNSPEC\s0 is assumed, that is, both \s-1AF_INET\s0 and \s-1AF_INET6\s0 will be both considered when resolving DNS names. AF_INET6 is prioritary. If you guess you are in trouble not reaching the peer,(the service is not available via ​AF_INET6 but AF_INET) you can either try Multihomed (try any address/family until reach) or concrete your address \*(C`family\*(C'\fR (\s-1AF_INET\s0, \s-1AF_INET6\s0). If \*(C`Proto\*(C'\fR is not given and you specify a symbolic \f(CW\*(C`PeerPort\*(C'\fR port, then the constructor will try to derive \*(C`Proto\*(C'\fR from the service name. As a last resort \*(C`Proto\*(C'\fR \*(L"tcp\*(R" is assumed. The \f(CW\*(C`Type\*(C'\fR parameter will be deduced from \*(C`Proto\*(C'\fR if not specified. If the constructor is only passed a single argument, it is assumed to be a \*(C`PeerAddr\*(C'\fR specification. If \*(C`Blocking\*(C'\fR is set to 0, the connection will be in nonblocking mode. If not specified it defaults to 1 (blocking mode). Examples: ​ $sock = IO::Socket::INET6−>new(PeerAddr => 'www.perl.org', ​ PeerPort => 'http(80)', ​ Proto => 'tcp'); Suppose either you have no IPv6 connectivity or www.perl.org has no http service on IPv6. Then, (Trying all address/families until reach) ​ $sock = IO::Socket::INET6−>new(PeerAddr => 'www.perl.org', ​ PeerPort => 'http(80)', ​ Multihomed => 1 , ​ Proto => 'tcp'); (Concrete to IPv4 protocol) ​ $sock = IO::Socket::INET6−>new(PeerAddr => 'www.perl.org', ​ PeerPort => 'http(80)', ​ Domain => AF_INET , ​ Proto => 'tcp'); ​ ​ ​ $sock = IO::Socket::INET6−>new(PeerAddr => 'localhost:smtp(25)'); ​ ​ $sock = IO::Socket::INET6−>new(Listen => 5, ​ LocalAddr => 'localhost', ​ LocalPort => 9000, ​ Proto => 'tcp'); ​ ​ $sock = IO::Socket::INET6−>new('[::1]:25'); ​ ​ $sock = IO::Socket::INET6−>new(PeerPort => 9999, ​ PeerAddr => inet_ntop(AF_INET6,in6addr_broadcast), ​ Proto => udp, ​ LocalAddr => 'localhost', ​ Broadcast => 1 ) ​ or die "Can't bind : $@\n"; ​ ​ NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. ​ NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE

METHODSaccept () See IO::Socket::INET. bind () See IO::Socket::INET. configure () This function exists in this module, but I (= Shlomi Fish) don't know what it does, or understand it. It's also not tested anywhere. I'll be happy to be enlightened. connect () See IO::Socket::INET. sockaddr () Return the address part of the sockaddr structure for the socket sockdomain() Returns the domain of the socket − AF_INET or AF_INET6 or whatever. sockport () Return the port number that the socket is using on the local host sockhost () Return the address part of the sockaddr structure for the socket in a text form (2001:800:40:2a05::10 or 245.245.13.27) sockflow () Return the flow information part of the sockaddr structure for the socket sockscope () Return the scope identification part of the sockaddr structure for the socket peeraddr () Return the address part of the sockaddr structure for the socket on the peer host peerport () Return the port number for the socket on the peer host. peerhost () Return the address part of the sockaddr structure for the socket on the peer host in a text form (2001:800:40:2a05::10 or 245.245.13.27) peerflow () Return the flow information part of the sockaddr structure for the socket on the peer host peerscope () Return the scope identification part of the sockaddr structure for the socket on the peer host

REPOSITORYThe Subversion repository for this module carrying complete version history and other information is: <http://svn.berlios.de/svnroot/repos/web−cpan/IO−Socket−INET6/>

SEE ALSOSocket,Socket6, IO::Socket

AUTHORThis program is based on IO::Socket::INET by Graham Barr <gbarr@pobox.com> and currently maintained by the Perl Porters. Modified by Rafael Martinez Torres <rafael.martinez@novagnet.com> and Euro6IX project. Modified further by Shlomi Fish <shlomif@iglu.org.il>, while disclaiming all copyrights.

COPYRIGHTCopyright (c) 2003− Rafael Martinez Torres <rafael.martinez@novagnet.com>. Copyright (c) 2003− Euro6IX project. Copyright (c) 1996−8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
0
Johanes Gumabo
Data Size   :   25,002 byte
man-IO::Socket::INET6.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 171,366
Visitor ID   :     :  
Visitor IP   :   3.137.221.252   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|IO::Socket::INET6.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|IO::Socket::INET6.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|IO::Socket::INET6.3pm|41|br══─}─══|'br══─}─══ )         (htmlprn|149|IO::Socket::INET6.3pm|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|IO::Socket::INET6.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|IO::Socket::INET6.3pm|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|IO::Socket::INET6.3pm|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|IO::Socket::INET6.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|IO::Socket::INET6.3pm|57|══─}─══|.══─}─══ )         (htmlprn|149|IO::Socket::INET6.3pm|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|141|\*(C`IO::Socket::INET6\*(C'\fR provides an object interface to creating and using sockets |\&\f(CW\*(C`IO::Socket::INET6\*(C'\fR provides an object interface to creating and using sockets )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|148|\*(C`IO::Socket::INET6\*(C'\fR object, which is a reference to a |Creates an \f(CW\*(C`IO::Socket::INET6\*(C'\fR object, which is a reference to a )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|149|\*(C`Symbol\*(C'\fR package). \f(CW\*(C`new\*(C'\fR |newly created symbol (see the \f(CW\*(C`Symbol\*(C'\fR package). \f(CW\*(C`new\*(C'\fR )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|153|\*(C`IO::Socket::INET6\*(C'\fR provides. |\&\f(CW\*(C`IO::Socket::INET6\*(C'\fR provides. )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|179|\*(C`Listen\*(C'\fR is defined then a listen socket is created, else if the |If \f(CW\*(C`Listen\*(C'\fR is defined then a listen socket is created, else if the )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|183|\*(C`MultiHomed\*(C'\fR on a socket |Although it is not illegal, the use of \f(CW\*(C`MultiHomed\*(C'\fR on a socket )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|188|\*(C`PeerAddr\*(C'\fR can be a hostname, the IPv6\-address on the |The \f(CW\*(C`PeerAddr\*(C'\fR can be a hostname, the IPv6\-address on the )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|190|\*(C`PeerPort\*(C'\fR can be a number or a symbolic |The \f(CW\*(C`PeerPort\*(C'\fR can be a number or a symbolic )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|193|\*(C`PeerPort\*(C'\fR specification can also be embedded in the \f(CW\*(C`PeerAddr\*(C'\fR |The \f(CW\*(C`PeerPort\*(C'\fR specification can also be embedded in the \f(CW\*(C`PeerAddr\*(C'\fR )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|197|\*(C`Domain\*(C'\fR is not given, \s-1AF_UNSPEC\s0 is assumed, that is, both \s-1AF_INET\s0 and \s-1AF_INET6\s0 will |If \f(CW\*(C`Domain\*(C'\fR is not given, \s-1AF_UNSPEC\s0 is assumed, that is, both \s-1AF_INET\s0 and \s-1AF_INET6\s0 will )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|201|\*(C`family\*(C'\fR (\s-1AF_INET\s0, \s-1AF_INET6\s0). |or concrete your address \f(CW\*(C`family\*(C'\fR (\s-1AF_INET\s0, \s-1AF_INET6\s0). )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|203|\*(C`Proto\*(C'\fR is not given and you specify a symbolic \f(CW\*(C`PeerPort\*(C'\fR port, |If \f(CW\*(C`Proto\*(C'\fR is not given and you specify a symbolic \f(CW\*(C`PeerPort\*(C'\fR port, )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|204|\*(C`Proto\*(C'\fR from the service |then the constructor will try to derive \f(CW\*(C`Proto\*(C'\fR from the service )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|205|\*(C`Proto\*(C'\fR \*(L"tcp\*(R" is assumed. The \f(CW\*(C`Type\*(C'\fR |name. As a last resort \f(CW\*(C`Proto\*(C'\fR \*(L"tcp\*(R" is assumed. The \f(CW\*(C`Type\*(C'\fR )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|206|\*(C`Proto\*(C'\fR if not specified. |parameter will be deduced from \f(CW\*(C`Proto\*(C'\fR if not specified. )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|209|\*(C`PeerAddr\*(C'\fR specification. |be a \f(CW\*(C`PeerAddr\*(C'\fR specification. )         (rof_escape_sequence|91|IO::Socket::INET6.3pm|211|\*(C`Blocking\*(C'\fR is set to 0, the connection will be in nonblocking mode. |If \f(CW\*(C`Blocking\*(C'\fR is set to 0, the connection will be in nonblocking mode. )