我们从Python开源项目中,提取了以下13个代码示例,用于说明如何使用gevent.socket.AI_PASSIVE。
def _resolve_special(hostname, family): if hostname == '': result = getaddrinfo(None, 0, family, SOCK_DGRAM, 0, AI_PASSIVE) if len(result) != 1: raise error('wildcard resolved to multiple address') return result[0][4][0] return hostname