Mono Class Library: System.Net Namespace

System.Net.SocketPermissionAttribute Class

Used to declaratively specify security actions to control socket connections. [Edit]

See Also: SocketPermissionAttribute Members

System.Object
     System.Attribute
          System.Security.Permissions.SecurityAttribute
               System.Security.Permissions.CodeAccessSecurityAttribute
                    System.Net.SocketPermissionAttribute

[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class SocketPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Remarks

The properties of a System.Net.SocketPermissionAttribute are required to have non-null values. Once set, the values of the properties cannot be changed.

Note:

The details of a socket connection are specified using the properties of the current instance. For example, to secure a socket connection to port 80, set the SocketPermissionAttribute.Port property equal to "80".

The security information declared by a security attribute is stored in the metadata of the attribute target, and is accessed by the system at run-time. Security attributes are used for declarative security only. For imperative security, use the corresponding permission class, System.Net.SocketPermission .

The allowable System.Net.SocketPermissionAttribute targets are determined by the System.Security.Permissions.SecurityAction passed to the constructor.

[Edit]

Requirements

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