SocketPermission.AddPermission Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a permission to the set of permissions for a transport address.
public:
void AddPermission(System::Net::NetworkAccess access, System::Net::TransportType transport, System::String ^ hostName, int portNumber);
public void AddPermission(System.Net.NetworkAccess access, System.Net.TransportType transport, string hostName, int portNumber);
member this.AddPermission : System.Net.NetworkAccess * System.Net.TransportType * string * int -> unit
Public Sub AddPermission (access As NetworkAccess, transport As TransportType, hostName As String, portNumber As Integer)
Parameters
- access
- NetworkAccess
One of the NetworkAccess values.
- transport
- TransportType
One of the TransportType values.
- hostName
- String
The host name for the transport address.
- portNumber
- Int32
The port number for the transport address.
Exceptions
hostName
is null
.
Remarks
The hostName
can be a DNS name, an IP address, or a specified IP subnet, such as 192.168.1.*.