英文:
What does the word "interface" mean as used in the net package in Go
问题
包net
提供了一个可移植的网络I/O接口,包括TCP/IP、UDP、域名解析和Unix域套接字。
这里提到的“接口”,是指它提供了用于执行I/O操作和上述其他操作的有用函数,还是指其他什么?因为当我开始学习Go编程语言时,有人告诉我interface
是Go内置的一种类型,允许我们执行多态操作,所以我不太理解上述语句中的用法。
我感觉我在脑子里把事情搞混了,因为我刚开始学习Go。
英文:
> Package net
provides a portable interface for network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets.
The "interface" used here, does it mean that it provides useful functions for preforming I/O operations and the many more operations listed above or something else? Because when I began learning Go programming language I was told that interface
is a type built into Go that allows us to perform polymorphism, so I don't understand the way it's used in the statement above.
I feel like I am mixing things in my head as I just started learning Go.
答案1
得分: 1
我认为我已经从gophers社区得到了问题的答案,我要感谢大家。
net包提供了一个有用的接口,它提供了一些有用的函数(API)来执行特定的网络I/O操作,包括TCP/IP、UDP、域名解析和Unix域套接字。
它提供了一些函数,使网络操作之间能够进行一定程度的通信。
英文:
I think I have been to get the answer to the question from the gophers community I say thanks guys.
net package provides useful interface that is it provides useful functions(API) to perform certain operation network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets.
it provides functions that enable some level of communication between network operations.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论