Mono Class Library: System.Net Namespace

System.Net.SocketPermission Class

Secures socket connections. [Edit]

See Also: SocketPermission Members

System.Object
     System.Security.CodeAccessPermission
          System.Net.SocketPermission

public sealed class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission

Thread Safety

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

Remarks

System.Net.SocketPermission instances control permission to accept connections or initiate socket connections. A socket permission can secure access based on host name or IP address, a port number, and a transport protocol.

The XML encoding of a System.Net.SocketPermission instance is defined below in EBNF format, in particular the following conventions are used:

The following meta-language symbols are used:

BuildVersion refers to the build version of the shipping CLI. This is a dotted build number such as '2412.0'.

ECMAPubKeyToken ::= b77a5c561934e089

HostName refers to a host name such as www.contoso.com .

Portnumber denotes a int value indicating a port.

TransportProtocol ::= 1 | 2 | 3 /*1= UDP , 2 = TCP, 3 = both */

SocketPermissionXML::=

<IPermission class="

System.Net.SocketPermission,

System,

Version=1.0.BuildVersion,

Culture=neutral,

PublicKeyToken=ECMAPubKeyToken"

version="1"

(

Unrestricted="true"

)

|

>

(<ConnectAccess>

(
<ENDPOINT>HostName#PortNumber#TransportProtocol</ENDPOINT>
)+
</ConnectAccess>
)
|
>
(<AcceptAccess>
(
<ENDPOINT>HostName#PortNumber#TransportProtocol</ENDPOINT>
)+
</AcceptAccess>
</IPermission>
)
|
/>

[Edit]

Requirements

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