Issue1051
Created on 2008年06月09日.13:22:24 by billiejoex, last changed 2009年01月07日.15:34:49 by amak.
| Messages | |||
|---|---|---|---|
| msg3261 (view) | Author: Giampaolo Rodola' (billiejoex) | Date: 2008年06月09日.13:22:19 | |
It is often needed to build clients/servers that support both IPv4 and IPv6. Example: # Echo client program import socket import sys HOST = 'daring.cwi.nl' # The remote host PORT = 50007 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: s = socket.socket(af, socktype, proto) except socket.error, msg: s = None continue try: s.connect(sa) except socket.error, msg: s.close() s = None continue break |
|||
| msg3268 (view) | Author: Giampaolo Rodola' (billiejoex) | Date: 2008年06月09日.18:00:19 | |
I noticed that also AI_PASSIVE is not available which is useful to build IPv4/IPv6 independent servers. |
|||
| msg3291 (view) | Author: Alan Kennedy (amak) | Date: 2008年06月19日.13:00:48 | |
Accepted that this is required for lookups that require both IPV4 and IPV6. Fixing this bug will require a thorough review of the existing code, for IPV6 compliance; a review which I will carry out soon. |
|||
| msg4007 (view) | Author: Alan Kennedy (amak) | Date: 2009年01月07日.15:34:49 | |
These constants were added to the socket module in r4948. More work will be necessary to support IPV6. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2009年01月07日 15:34:49 | amak | set | status: open -> closed resolution: fixed messages: + msg4007 |
| 2008年12月17日 19:51:49 | fwierzbicki | set | priority: normal |
| 2008年06月19日 13:00:49 | amak | set | assignee: amak messages: + msg3291 nosy: + amak |
| 2008年06月09日 18:00:25 | billiejoex | set | messages:
+ msg3268 severity: normal -> major components: + Library title: socket does not define AF_UNSPEC constant -> socket does not define AF_UNSPEC and AI_PASSIVE constants |
| 2008年06月09日 13:22:24 | billiejoex | create | |
Supported by Python Software Foundation,
Powered by Roundup