{
    "mode": "info",
    "parameter": "IO::Socket::INET6",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/IO%3A%3ASocket%3A%3AINET6/json",
    "generated": "2026-07-05T13:35:56Z",
    "synopsis": "use IO::Socket::INET6;",
    "sections": {
        "NAME": {
            "content": "IO::Socket::INET6 - [ DEPRECATED!! ] Object interface for\nAFINET/AFINET6 domain sockets\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use IO::Socket::INET6;\n",
            "subsections": []
        },
        "WARNING": {
            "content": "WARNING!! IO-Socket-INET6 is deprecated.\n\nIO-Socket-INET6 was now succeeded by Paul Evans' IO::Socket::IP .\nPlease convert old code from IO-Socket-INET6 to IO-Socket-IP.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"IO::Socket::INET6\" provides an object interface to creating and using\nsockets in either AFINET or AFINET6 domains. It is built upon the\nIO::Socket interface and inherits all the methods defined by\nIO::Socket.\n",
            "subsections": []
        },
        "CONSTRUCTOR": {
            "content": "new ( [ARGS] )\nCreates an \"IO::Socket::INET6\" object, which is a reference to a\nnewly created symbol (see the \"Symbol\" package). \"new\" optionally\ntakes arguments, these arguments are in key-value pairs.\n\nIn addition to the key-value pairs accepted by IO::Socket,\n\"IO::Socket::INET6\" provides.\n\nDomain      Address family               AFINET | AFINET6 | AFUNSPEC (default)\nPeerAddr    Remote host address          <hostname>[:<port>]\nPeerHost    Synonym for PeerAddr\nPeerPort    Remote port or service       <service>[(<no>)] | <no>\nPeerFlow    Remote flow information\nPeerScope   Remote address scope\nLocalAddr   Local host bind address      hostname[:port]\nLocalHost   Synonym for LocalAddr\nLocalPort   Local host bind port         <service>[(<no>)] | <no>\nLocalFlow   Local host flow information\nLocalScope  Local host address scope\nProto       Protocol name (or number)    \"tcp\" | \"udp\" | ...\nType        Socket type                  SOCKSTREAM | SOCKDGRAM | ...\nListen      Queue size for listen\nReuseAddr   Set SOREUSEADDR before binding\nReuse       Set SOREUSEADDR before binding (deprecated, prefer ReuseAddr)\nReusePort   Set SOREUSEPORT before binding\nBroadcast   Set SOBROADCAST before binding\nTimeout     Timeout value for various operations\nMultiHomed  Try all addresses for multi-homed hosts\nBlocking    Determine if connection will be blocking mode\n\nIf \"Listen\" is defined then a listen socket is created, else if the\nsocket type, which is derived from the protocol, is SOCKSTREAM\nthen connect() is called.\n\nAlthough it is not illegal, the use of \"MultiHomed\" on a socket\nwhich is in non-blocking mode is of little use. This is because the\nfirst connect will never fail with a timeout as the connect call\nwill not block.\n\nThe \"PeerAddr\" can be a hostname,  the IPv6-address on the\n\"2001:800:40:2a05::10\" form , or the IPv4-address on the\n\"213.34.234.245\" form.  The \"PeerPort\" can be a number or a\nsymbolic service name.  The service name might be followed by a\nnumber in parenthesis which is used if the service is not known by\nthe system.  The \"PeerPort\" specification can also be embedded in\nthe \"PeerAddr\" by preceding it with a \":\", and closing the IPv6\naddress on brackets \"[]\" if necessary:\n\"124.678.12.34:23\",\"[2a05:345f::10]:23\",\"any.server.com:23\".\n\nIf \"Domain\" is not given, AFUNSPEC is assumed, that is, both\nAFINET and AFINET6 will be both considered when resolving DNS\nnames. AFINET6 has priority.  If you guess you are in trouble not\nreaching the peer,(the service is not available via AFINET6 but\nAFINET) you can either try Multihomed (try any address/family\nuntil reach) or concrete your address \"family\" (AFINET, AFINET6).\n\nIf \"Proto\" is not given and you specify a symbolic \"PeerPort\" port,\nthen the constructor will try to derive \"Proto\" from the service\nname.  As a last resort \"Proto\" \"tcp\" is assumed.  The \"Type\"\nparameter will be deduced from \"Proto\" if not specified.\n\nIf the constructor is only passed a single argument, it is assumed\nto be a \"PeerAddr\" specification.\n\nIf \"Blocking\" is set to 0, the connection will be in nonblocking\nmode.  If not specified it defaults to 1 (blocking mode).\n\nExamples:\n\n$sock = IO::Socket::INET6->new(PeerAddr => 'www.perl.org',\nPeerPort => 'http(80)',\nProto    => 'tcp');\n\nSuppose either you have no IPv6 connectivity or www.perl.org has no\nhttp service on IPv6. Then,\n\n(Trying all address/families until reach)\n\n$sock = IO::Socket::INET6->new(PeerAddr => 'www.perl.org',\nPeerPort => 'http(80)',\nMultihomed => 1 ,\nProto    => 'tcp');\n\n(Concrete to IPv4 protocol)\n\n$sock = IO::Socket::INET6->new(PeerAddr => 'www.perl.org',\nPeerPort => 'http(80)',\nDomain => AFINET ,\nProto    => 'tcp');\n\n$sock = IO::Socket::INET6->new(PeerAddr => 'localhost:smtp(25)');\n\n$sock = IO::Socket::INET6->new(Listen    => 5,\nLocalAddr => 'localhost',\nLocalPort => 9000,\nProto     => 'tcp');\n\n$sock = IO::Socket::INET6->new('[::1]:25');\n\n$sock = IO::Socket::INET6->new(PeerPort  => 9999,\nPeerAddr  => Socket6::inetntop(AFINET6,in6addrbroadcast),\nProto     => udp,\nLocalAddr => 'localhost',\nBroadcast => 1 )\nor die \"Can't bind : $@\\n\";\n\nNOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE\n\nAs of VERSION 1.18 all IO::Socket objects have autoflush turned on\nby default. This was not the case with earlier releases.\n\nNOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE\n\nMETHODS\naccept ()\nSee IO::Socket::INET.\n\nbind ()\nSee IO::Socket::INET.\n\nconfigure ()\nThis function exists in this module, but I (= Shlomi Fish) don't\nknow what it does, or understand it. It's also not tested anywhere.\nI'll be happy to be enlightened.\n\nconnect ()\nSee IO::Socket::INET.\n\nsockaddr ()\nReturn the address part of the sockaddr structure for the socket\n\nsockdomain()\nReturns the domain of the socket - AFINET or AFINET6 or whatever.\n\nsockport ()\nReturn the port number that the socket is using on the local host\n\nsockhost ()\nReturn the address part of the sockaddr structure for the socket in\na text form (\"2001:800:40:2a05::10\" or \"245.245.13.27\")\n\nsockflow ()\nReturn the flow information part of the sockaddr structure for the\nsocket\n\nsockscope ()\nReturn the scope identification part of the sockaddr structure for\nthe socket\n\npeeraddr ()\nReturn the address part of the sockaddr structure for the socket on\nthe peer host\n\npeerport ()\nReturn the port number for the socket on the peer host.\n\npeerhost ()\nReturn the address part of the sockaddr structure for the socket on\nthe peer host in a text form (\"2001:800:40:2a05::10\" or\n\"245.245.13.27\")\n\npeerflow ()\nReturn the flow information part of the sockaddr structure for the\nsocket on the peer host\n\npeerscope ()\nReturn the scope identification part of the sockaddr structure for\nthe socket on the peer host\n",
            "subsections": []
        },
        "REPOSITORY": {
            "content": "The Subversion repository for this module carrying complete version\nhistory and other information is:\n\n<http://svn.berlios.de/svnroot/repos/web-cpan/IO-Socket-INET6/>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Socket,Socket6, IO::Socket\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This program is based on IO::Socket::INET by Graham Barr\n<gbarr@pobox.com> and currently maintained by the Perl Porters.\n\nModified by Rafael Martinez Torres <rafael.martinez@novagnet.com> and\nEuro6IX project.\n\nModified further by Shlomi Fish <shlomif@iglu.org.il>, while\ndisclaiming all copyrights.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 2003- Rafael Martinez Torres\n<rafael.martinez@novagnet.com>.\n\nCopyright (c) 2003- Euro6IX project.\n\nCopyright (c) 1996-8 Graham Barr <gbarr@pobox.com>.\n\nAll rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n\nperl v5.32.1                      2021-12-13            IO::Socket::INET6(3pm)",
            "subsections": []
        }
    },
    "summary": "IO::Socket::INET6 - [ DEPRECATED!! ] Object interface for AFINET/AFINET6 domain sockets",
    "flags": [],
    "examples": [],
    "see_also": []
}