类 NetworkKit

java.lang.Object
com.iohao.game.common.kit.NetworkKit

public class NetworkKit extends Object
copy from
     io.scalecube
     ali broker
 
作者:
渔民小镇
日期:
2022-05-14
  • 字段详细资料

    • IP_BLACK_LIST

      public final List<String> IP_BLACK_LIST
      ip black list. 10.0.2.15 is default ip for virtual box vm
    • LOCAL_IP

      public String LOCAL_IP
      类似 127.0.0.1 ,但这里是本机的 ip
    • ADDRESS_FORMAT

      public final Pattern ADDRESS_FORMAT
  • 构造器详细资料

    • NetworkKit

      public NetworkKit()
  • 方法详细资料

    • hasPort

      public boolean hasPort(String hostAndPort, int port)
    • getHost

      public String getHost(String hostAndPort)
      Parses given host:port string to create Address instance.
      参数:
      hostAndPort - must come in form host:port
    • getPort

      public int getPort(String hostAndPort)
    • isInternalIp

      public boolean isInternalIp(String ipOrHost)
    • isInternalIp

      public boolean isInternalIp(byte[] addr)