指定网络访问权限。Specifies network access permissions.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
public enum class NetworkAccess
[System.Flags] public enum NetworkAccess
public enum NetworkAccess
type NetworkAccess =
Public Enum NetworkAccess
指示允许应用程序在本地资源上接受来自 Internet 的连接。Indicates that the application is allowed to accept connections from the Internet on a local resource. 请注意，这是对本地主机的保护，这种保护使用 Accept 为本地资源（地址/端口）授予访问权限。Notice that this is a protection for the local host that uses Accept to grant access to a local resource (address/port). 当套接字尝试绑定到此本地资源时，将执行权限检查以确定资源上是否存在 Accept。At the time a socket tries to bind to this local resource a permission check is performed to see if an Accept exists on that resource.
指示允许应用程序连接到特定的 Internet 资源。Indicates that the application is allowed to connect to specific Internet resources. 请注意，对于远程主机资源，不执行任何确定 Connect 权限是否存在的检查。Notice that, in the case of remote host resource, no check is performed to see that Connect permissions exist. 这是因为连接远程主机的端口是未知的，而且无法预先生成合适的权限。This is because the port of a connecting remote host is unknown and not suitable permissions can be built in advance. 应用程序负责检查尝试连接到侦听套接字的远程主机的权限。It is the application responsibility to check the permissions of the remote host trying to connect to a listening socket.