<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.6.20305.6" />

SocketPermissionAttribute

Specifies security actions to control Socket connections. This class cannot be inherited.
public string Access { get; set; }

Gets or sets the network access method that is allowed by this SocketPermissionAttribute.

public string Host { get; set; }

Gets or sets the DNS host name or IP address that is specified by this SocketPermissionAttribute.

public string Port { get; set; }

Gets or sets the port number that is associated with this SocketPermissionAttribute.

public string Transport { get; set; }

Gets or sets the TransportType that is specified by this SocketPermissionAttribute.

Initializes a new instance of the SocketPermissionAttribute class with the specified SecurityAction value.