IP:Port 这种形式有统一的叫法吗?

2016-10-11 10:29:31 +08:00
 zungmou
例如 114.114.114.114:53 这种形式,该怎么称呼?
5219 次点击
所在节点    问与答
24 条回复
wyntergreg
2016-10-11 10:34:06 +08:00
艾屁冒号炮特
calease
2016-10-11 10:37:41 +08:00
socket
lrh3321
2016-10-11 10:40:17 +08:00
IPEndPoint
bugmenein
2016-10-11 10:41:25 +08:00
不如直接提整个 URI ( https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)?
scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]
zungmou
2016-10-11 10:46:40 +08:00
@calease 这叫 socket?
@lrh3321 这个好像是 .net 的称呼。
@bugmenein 没看懂!
airqj
2016-10-11 10:48:42 +08:00
服务
onlyice
2016-10-11 10:48:45 +08:00
endpoint
shlabc
2016-10-11 10:49:03 +08:00
hostmame+port=host
xderam
2016-10-11 10:53:47 +08:00
二元组?
shoaly
2016-10-11 10:57:51 +08:00
endpoint+1
timothyqiu
2016-10-11 11:06:15 +08:00
socket

根据 RFC 793 ( TCP ):
> To allow for many processes within a single Host to use TCP communication facilities simultaneously, the TCP provides a set of addresses or ports within each host. Concatenated with the network and host addresses from the internet communication layer, this forms a socket.
sutra
2016-10-11 11:42:49 +08:00
套接字

哈哈哈,这个翻译很强大。
miaoever
2016-10-11 11:52:13 +08:00
socket
zungmou
2016-10-11 13:41:51 +08:00
@timothyqiu 虽然可以叫 soket, 但是感觉没有人会在代码里这样命名吧?
shiji
2016-10-11 13:45:32 +08:00
socket address
shiji
2016-10-11 13:52:59 +08:00
socket address 的具体理由:

参见:
https://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html

https://docs.python.org/2/library/socket.html

Socket addresses are represented as follows: A single string is used for the AF_UNIX address family. A pair (host, port) is used for the AF_INET address family, where host is a string representing either a hostname in Internet domain notation like 'daring.cwi.nl' or an IPv4 address like '100.50.200.5', and port is an integer.
sobigfish
2016-10-11 14:17:38 +08:00
URI 和 socket 都是特定使用的场景的叫法,叫法也只有按场景来吧
bigpigeon
2016-10-11 14:30:03 +08:00
tcp/ip
qfdk
2016-10-11 14:49:29 +08:00
代理
zungmou
2016-10-11 14:57:46 +08:00
@shiji Thank you very much, 我就问一句,遇到类似的情况,你在代码里是如何命名的?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/311812

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX