lxk11153
V2EX  ›  Java

InetSocketAddress Resolved/Unresolved 对后续使用上有啥区别吗?

  •  
  •   lxk11153 · Jul 28, 2020 · 1553 views
    This topic created in 2166 days ago, the information mentioned may be changed or developed.
    • java.net.InetSocketAddress#createUnresolved(String, int)
    • java.net.InetSocketAddress#InetSocketAddress(String, int)
      • 包含了域名转 IP 这一步,意思是后续需要用到 ip 地址的地方就不需要每个地方自行转换了?
    Supplement 1  ·  Oct 1, 2020

    This class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname. If resolution fails then the address is said to be unresolved but can still be used on some circumstances like connecting through a proxy.

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5362 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 95ms · UTC 08:26 · PVG 16:26 · LAX 01:26 · JFK 04:26
    ♥ Do have faith in what you're doing.