V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
19930618
V2EX  ›  Python

Python 中关于 socket 中 gethostbyname 和 getaddrinfo 的区别

  •  
  •   19930618 · Jul 23, 2019 · 2639 views
    This topic created in 2478 days ago, the information mentioned may be changed or developed.

    我现在想将域名解析成 IP 地址,请问使用 socket.gethostbyname 和 socket.getaddrinfo 的有什么区别?

    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   782 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:34 · PVG 03:34 · LAX 12:34 · JFK 15:34
    ♥ Do have faith in what you're doing.