首页 > 试题广场 >

在socket编程中,可以使用方法(  ...

[单选题]
在socket编程中,可以使用方法(      )获取本机的ip地址
  • getInetAddress()
  • getLocalAddress()
  • getReuseAddress()
  • getLocalPort()
getInetAddress获取主机名和IP地址
getLocalAddress()顾名思义,获取本地IP地址
getReuseAddress()返回布尔类型,表示复用地址
getLocalPort()API 的说明:“Returns the Internet Protocol (IP) port number of the interface on which the request was received. ”
发表于 2019-08-05 21:25:40 回复(2)
这题考查单词的认识情况。
发表于 2020-05-31 20:00:05 回复(0)
来个误导项 ipconfig🤣
发表于 2020-03-06 22:47:31 回复(7)
本题由MC枫少为您解析:
只要英语学得好,不怕此题答不对.
localAddress  顾名思义  本机地址
发表于 2019-11-04 18:45:15 回复(2)
Address出现3次 Local出现两次 其他均只有一次 根据多年答题经验 选B正确率百分之99
发表于 2020-05-03 22:05:20 回复(0)
getinetaddress 获取主机名和地址 getlocaladdress 获取本机ip地址 getrequestaddress 获取复用地址 getlocalport返回接口的端口号
发表于 2024-02-16 00:20:16 回复(0)
很好,又记住一个
发表于 2023-07-31 15:34:37 回复(0)
getInetAddress获取主机名和IP地址 getLocalAddress()顾名思义,获取本地IP地址 getReuseAddress()返回布尔类型,表示复用地址 getLocalPort()API 的说明:“Returns the Internet Protocol (IP) port number of the interface on which the request was received. ”
发表于 2022-10-06 16:11:00 回复(0)
getInetAddress获取主机名和IP地址 getLocalAddress()顾名思义,获取本地IP地址 getReuseAddress()返回布尔类型,表示复用地址 getLocalPort()API 的说明:“Returns the Internet Protocol (IP) port number of the interface on which the request was received. ”
发表于 2021-11-04 16:02:57 回复(0)
用惯了getInetAddress().nextElement()了
发表于 2020-06-19 15:45:35 回复(0)
getInetAddress:返回连接对应的地址
发表于 2020-02-06 13:15:01 回复(0)