IPv6 question
John Burton
john.burton at jbmail.com
Wed Feb 18 03:45:39 EST 2004
Martin v. Löwis wrote:
> Erno Kuusela wrote:
>
>> you can control this using the IPV6_V6ONLY socket option, like so:
>>
>> s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
>>
>> unfortunately python 2.3.3 doesn't yet make that constant available
>> though it is fixed in cvs. you could glean the value from the headers.
>>
>> the default setting has been in flux on various platforms recently,
>> all the more reason to want to always set it explicitly...
>
>
> I think the OP would prefer to have a single socket for both protocol
> types, in which case he should set it to 1 on windows, right?
Well it's not idea that different platforms work differently here
although it's easy enough to work around that. I'll try the setsockopt
and see if I can use that.
Thanks for the replies everyone.
More information about the Python-list
mailing list