System.Net.SocketPermission.AddPermission Method

Adds a permission to the set of permissions for a transport address.

Syntax

public void AddPermission (NetworkAccess access, TransportType transport, string hostName, int portNumber)

Parameters

access
One of the System.Net.NetworkAccess values.
transport
One of the System.Net.TransportType values.
hostName
The host name for the transport address.
portNumber
The port number for the transport address.

Remarks

The hostName can be a DNS name, an IP address, or a specified IP subnet, such as 192.168.1.*.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0