Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8620831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:40:34+00:00 2026-06-12T06:40:34+00:00

(Please close this thread if duplicate, I tried hard, but couldn’t find any matching

  • 0

(Please close this thread if duplicate, I tried hard, but couldn’t find any matching question)

It seems some OS/platforms listen for both IPv6 and IPv4 (tcp) connections when bound to IPv6 widcard address, while some listen for only IPv6, as mentioned in:

for the V6Only argument

with the following lines:

If your platform does not support disabling this option but you still want to listen for both AF_INET and AF_INET6 connections you will have to create two listening sockets, one bound to each protocol

And in the section “How IPv6 Works on a Java Platform“

And as per correct answer in this SO question

Now I want to write some Perl code which can determine if the underlying OS/platform listens for both IPv6 and IPv4 (if bound to IPv6), if yes, I’ll bind to IPv6 only, if no I’ll create 2 sockets (1 for IPv4 and another for IPv6).

I wonder what could be the best way for this?

As mentioned in IO::Socket::IP I could use

if( IO::Socket::IP->CAN_DISABLE_V6ONLY ) {
    ...
}
else {
    ...
}

But, I am not sure if it will tell me exactly

if the underlying OS/platform listens for both IPv6 and IPv4 (if bound to IPv6)

Or it will just tells that the

IPV6_V6ONLY socket option cannot be disabled

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:40:35+00:00Added an answer on June 12, 2026 at 6:40 am

    it just tells that the “IPV6_V6ONLY socket option cannot be disabled”

    This is correct.

    What you can do is attempt to create a PF_INET6 socket, then if successful, check its IPV6_V6ONLY socket option. If that’s true, then the socket is listening only on IPv6 and not IPv4 as well, so you’ll have to create another. If it is false, then the socket will capture both IPv6 and IPv4, and this one socket will be sufficient.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: It looks like I'm completely misinformed. Please close this thread. Gah. For the
My question is rather subjective, moderators please do not close it, for I want
Possible Duplicate: Close mysql connection (PHP) Please help me, I not know where add
Please i need help, this code below works fine on my localhost, php5.3+ but
Updated: please see this other thread instead, all this COM stuff is not part
Before anyone closes this is a duplicate of this , please hold your horses,
Please accept my apologies,if this question is repeatative. I searched existing questions and solutions
Can someone please explain how to understand a logcat from an android force close.
Please help me somebody to convert unicodestring into string This is how i am
This thread is the continuation of the below thread Trigger Windows Service when the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.