<Type Name="SocketPermission" FullName="System.Net.SocketPermission" FullNameSP="System_Net_SocketPermission" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public serializable SocketPermission extends System.Security.CodeAccessPermission" />
  <TypeSignature Language="C#" Value="public sealed class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission" />
  <MemberOfLibrary>Networking</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.x.x</AssemblyVersion>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.Security.CodeAccessPermission</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.Security.Permissions.IUnrestrictedPermission</InterfaceName>
    </Interface>
  </Interfaces>
  <Docs>
    <summary>
      <para> Secures socket connections.
      </para>
    </summary>
    <remarks>
      <para>
        <see cref="T: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. </para>
      <para>The XML encoding of a <see cref="T:System.Net.SocketPermission" /> instance is defined below in EBNF format,
   in particular the following conventions are used: </para>
      <list type="bullet">
        <item>
          <term>
            <para> All non-literals in the grammar below are shown in normal type.</para>
          </term>
        </item>
        <item>
          <term>
            <para> All literals are in bold font. </para>
          </term>
        </item>
      </list>
      <para> The following meta-language symbols are used: </para>
      <list type="bullet">
        <item>
          <term>
         
         '*' represents a meta-language symbol suffixing an
         expression that can appear zero or more times.</term>
        </item>
        <item>
          <term>
         
         '?' represents a meta-language symbol suffixing an
         expression that can appear zero or one time.</term>
        </item>
        <item>
          <term>
         
         '+' represents a meta-language symbol suffixing an
         expression that can appear one or more times.</term>
        </item>
        <item>
          <term>
         
         '(',')' is used to group literals, non-literals or a
         mixture of literals and non-literals.</term>
        </item>
        <item>
          <term>
         
         '|' denotes an exclusive disjunction between two
         expressions.</term>
        </item>
        <item>
          <term>
         
         '::= ' denotes a production rule where a left hand
         non-literal is replaced by a right hand expression containing literals,
         non-literals or both.</term>
        </item>
      </list>
      <para> BuildVersion refers to the build version of the shipping CLI. This is
   a dotted build number such as '2412.0'.</para>
      <para>ECMAPubKeyToken ::= <see langword="b77a5c561934e089" /></para>
      <para>HostName refers to a host name such as <c>www.contoso.com</c> . </para>
      <para>Portnumber denotes a <see cref="T:System.Int32" /> value indicating a port. </para>
      <para>TransportProtocol ::= <see langword="1" /> | <see langword="2" /> | <see langword="3 " />/*1= UDP , 2 = TCP, 3 = both */ </para>
      <para>SocketPermissionXML::=
   </para>
      <para>
        <c>
          <see langword="&lt;IPermission class=&quot;" />
        </c>
      </para>
      <para>
        <c>
          <see langword="System.Net.SocketPermission," />
        </c>
      </para>
      <para>
        <c>
          <see langword="System, " />
        </c>
      </para>
      <para>
        <c>
          <see langword="Version=1.0." />BuildVersion<see langword=", " /></c>
      </para>
      <para>
        <c>
          <see langword="Culture=neutral," />
        </c>
      </para>
      <para>
        <c>
          <see langword="PublicKeyToken" />=ECMAPubKeyToken<see langword="&quot;" /></c>
      </para>
      <para>
        <c>
          <see langword="version=&quot;1&quot; " />
        </c>
      </para>
      <para>
        <c>( </c>
      </para>
      <para>
        <c>
          <see langword="Unrestricted=&quot;true&quot;" />
        </c>
      </para>
      <para>
        <c>) </c>
      </para>
      <para>
        <c>| </c>
      </para>
      <para>
        <c>&gt; </c>
      </para>
      <para>
        <c>(<see langword="&lt;ConnectAccess&gt;" /></c>
      </para>
      <c>
        <para>(</para>
        <para>
          <see langword="&lt;ENDPOINT&gt;" />HostName<see langword="#" />PortNumber<see langword="#" />TransportProtocol<see langword="&lt;/ENDPOINT&gt;" /></para>
        <para>)+</para>
        <para>
          <see langword="&lt;/ConnectAccess&gt;" />
        </para>
        <para>)</para>
        <para>|</para>
        <para>
          <see langword="&gt;" />
        </para>
        <para>(<see langword="&lt;AcceptAccess&gt;" /></para>
        <para>(</para>
        <para>
          <see langword="&lt;ENDPOINT&gt;" />HostName<see langword="#" />PortNumber<see langword="#" />TransportProtocol<see langword="&lt;/ENDPOINT&gt;" /></para>
        <para>)+</para>
        <para>
          <see langword="&lt;/AcceptAccess&gt;" />
        </para>
        <para>
          <see langword="&lt;/IPermission&gt;" />
        </para>
        <para>)</para>
        <para>|</para>
        <para>
          <see langword="/&gt;" />
        </para>
        <para>
          <see langword="" />
        </para>
      </c>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.PermissionState state)" />
      <MemberSignature Language="C#" Value="public SocketPermission (System.Security.Permissions.PermissionState state);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="state" Type="System.Security.Permissions.PermissionState" />
      </Parameters>
      <Docs>
        <param name="state">A <see cref="T:System.Security.Permissions.PermissionState" /> value.</param>
        <summary>
          <para>Constructs and initializes a new instance of the <see cref="T:System.Net.SocketPermission" /> class with the specified
<see cref="T:System.Security.Permissions.PermissionState" /> value.</para>
        </summary>
        <remarks>
          <block subset="none" type="note">
            <para>This constructor creates either fully restricted (<see cref="F:System.Security.Permissions.PermissionState.None" />) 
      or <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" /> access to
      sockets.</para>
          </block>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Net.NetworkAccess access, valuetype System.Net.TransportType transport, string hostName, int32 portNumber)" />
      <MemberSignature Language="C#" Value="public SocketPermission (System.Net.NetworkAccess access, System.Net.TransportType transport, string hostName, int portNumber);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="access" Type="System.Net.NetworkAccess" />
        <Parameter Name="transport" Type="System.Net.TransportType" />
        <Parameter Name="hostName" Type="System.String" />
        <Parameter Name="portNumber" Type="System.Int32" />
      </Parameters>
      <Docs>
        <param name="access">A <see cref="T:System.Net.NetworkAccess" /> value indicating the type of access to secure.</param>
        <param name="transport">A <see cref="T:System.Net.TransportType" /> value indicating the transport type to secure. Specify <see cref="F:System.Net.TransportType.All" /> to create a permission that secures all transport types.</param>
        <param name="hostName">A <see cref="T:System.String" /> containing the host name for the transport address.</param>
        <param name="portNumber">A <see cref="T:System.Int32" /> containing the port number for the transport address. Specify <see cref="F:System.Net.SocketPermission.AllPorts" /> create a permission that secures all ports.</param>
        <summary>
          <para>Constructs and initializes a new instance of the <see cref="T:System.Net.SocketPermission" /> class.</para>
        </summary>
        <remarks>
          <para>No exception is thrown if the specified <see cref="T:System.Net.TransportType" /> or
<see cref="T:System.Net.NetworkAccess" /> is
   invalid.</para>
        </remarks>
        <exception cref="T:System.ArgumentNullException">The <paramref name="hostName" /> parameter is <see langword="null" />.</exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="AcceptList">
      <MemberSignature Language="C#" Value="public System.Collections.IEnumerator AcceptList { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Collections.IEnumerator</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="AddPermission">
      <MemberSignature Language="C#" Value="public void AddPermission (System.Net.NetworkAccess access, System.Net.TransportType transport, string hostName, int portNumber);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="access" Type="System.Net.NetworkAccess" />
        <Parameter Name="transport" Type="System.Net.TransportType" />
        <Parameter Name="hostName" Type="System.String" />
        <Parameter Name="portNumber" Type="System.Int32" />
      </Parameters>
      <Docs>
        <param name="access">To be added.</param>
        <param name="transport">To be added.</param>
        <param name="hostName">To be added.</param>
        <param name="portNumber">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="AllPorts">
      <MemberSignature Language="ILASM" Value=".field public static literal int32 AllPorts = -1" />
      <MemberSignature Language="C#" Value="public const int AllPorts = -1;" />
      <MemberType>Field</MemberType>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Defines a constant value that represents all ports.
 </para>
 This field is read-only. The value of this field is -1.
</summary>
        <remarks>To be added.</remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <MemberValue>-1</MemberValue>
    </Member>
    <Member MemberName="ConnectList">
      <MemberSignature Language="C#" Value="public System.Collections.IEnumerator ConnectList { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Collections.IEnumerator</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Copy">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Copy()" />
      <MemberSignature Language="C#" Value="public override System.Security.IPermission Copy ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.IPermission</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Returns a new <see cref="T:System.Net.SocketPermission" /> object containing the same values as the
 current instance.
 </para>
        </summary>
        <returns>
          <para>A new <see cref="T:System.Net.SocketPermission" /> containing the same values as the current instance.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para> The
 object returned by this method represents the same level of access as the
 current instance.</para>
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Copy" /> and is implemented to
 support the <see cref="T:System.Security.IPermission" /> interface.</para>
          </block>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="FromXml">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual void FromXml(class System.Security.SecurityElement securityElement)" />
      <MemberSignature Language="C#" Value="public override void FromXml (System.Security.SecurityElement securityElement);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="securityElement" Type="System.Security.SecurityElement" />
      </Parameters>
      <Docs>
        <param name="securityElement">A <see cref="T:System.Security.SecurityElement" /> instance containing the XML encoding used to reconstruct the state of a <see cref="T:System.Net.SocketPermission" /> object.</param>
        <summary>
          <para>Reconstructs the state of a <see cref="T:System.Net.SocketPermission" /> object using the specified XML encoding.</para>
        </summary>
        <remarks>
          <para>The state of the current instance is changed to the state
      encoded in <paramref name="securityElement" />.</para>
          <block subset="none" type="note">
            <para>For the XML schema for this class, see the
      <see cref="T:System.Net.SocketPermission" /> class
         page.</para>
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.FromXml(System.Security.SecurityElement)" />.</para>
          </block>
        </remarks>
        <exception cref="T:System.ArgumentNullException">
          <para>
            <paramref name="securityElement " />is <see langword="null" />.</para>
        </exception>
        <exception cref="T:System.ArgumentException">
          <para>
            <paramref name="securityElement " />is not a <see cref="T:System.Net.SocketPermission" /> permission element.</para>
        </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Intersect">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Intersect(class System.Security.IPermission target)" />
      <MemberSignature Language="C#" Value="public override System.Security.IPermission Intersect (System.Security.IPermission target);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.IPermission</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="target" Type="System.Security.IPermission" />
      </Parameters>
      <Docs>
        <param name="target">A <see cref="T:System.Net.SocketPermission" /> instance to intersect with the current instance.</param>
        <summary>
          <para> Returns a <see cref="T:System.Net.SocketPermission" /> object that is the intersection of the current
   instance and the specified object.</para>
        </summary>
        <returns>
          <para>A new <see cref="T:System.Net.SocketPermission" /> instance that represents the intersection of the
   current instance and <paramref name="target" />. If target is
<see langword="null" />, returns <see langword="null" />. If the intersection is
   empty, returns <see langword="null" />. If the
   current instance is unrestricted, returns a copy of <paramref name="target" />. If
<paramref name="target" /> is unrestricted, returns a copy of the current instance.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para>The intersection of two permissions is a permission that secures the
         resources and operations secured by both permissions. Specifically, it
         represents the minimum permission such that any demand that passes both
         permissions will also pass their intersection.</para>
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Intersect(System.Security.IPermission)" /> and is implemented to
      support the <see cref="T:System.Security.IPermission" /> interface.</para>
          </block>
        </remarks>
        <exception cref="T:System.ArgumentException">
          <paramref name="target" /> is not of type <see cref="T:System.Net.SocketPermission" /> .</exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="IsSubsetOf">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool IsSubsetOf(class System.Security.IPermission target)" />
      <MemberSignature Language="C#" Value="public override bool IsSubsetOf (System.Security.IPermission target);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="target" Type="System.Security.IPermission" />
      </Parameters>
      <Docs>
        <param name="target">A <see cref="T:System.Net.SocketPermission" /> instance that is to be tested for the subset relationship.</param>
        <summary>
          <para> Determines whether the current instance is a subset of the specified
      object.</para>
        </summary>
        <returns>
          <para>
            <see langword="true" /> if the current instance is a subset of <paramref name="target" /> ;
   otherwise,<see langword=" false" />. If the current instance is unrestricted, and
<paramref name="target" /> is not, returns <see langword="false" />. If <paramref name="target" /> is 
   unrestricted, returns <see langword="true" />. If <paramref name="target" /> is
<see langword="null" /> 
and the current instance does not secure any resources and is not unrestricted, returns <see langword="true" />.</para>
        </returns>
        <remarks>
          <para>The subset relationship is <see langword="true" /> if every resource secured by the current
   instance is secured by <paramref name="target" />
   .</para>
          <block subset="none" type="note">
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.IsSubsetOf(System.Security.IPermission)" /> and is implemented to
   support the <see cref="T:System.Security.IPermission" /> interface.</para>
          </block>
        </remarks>
        <exception cref="T:System.ArgumentException">
          <para>
            <paramref name="target " />is not <see langword="null" /> and is not of type <see cref="T:System.Net.SocketPermission" />.</para>
        </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="IsUnrestricted">
      <MemberSignature Language="C#" Value="public bool IsUnrestricted ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="ToXml">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.SecurityElement ToXml()" />
      <MemberSignature Language="C#" Value="public override System.Security.SecurityElement ToXml ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.SecurityElement</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Returns the XML encoding of the current instance.</para>
        </summary>
        <returns>
          <para>A <see cref="T:System.Security.SecurityElement" /> containing the XML encoding of the state of the current instance.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para>For the XML schema for this class, see the <see cref="T:System.Net.SocketPermission" /> class
 page.</para>
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.ToXml" /> .</para>
          </block>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Union">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Union(class System.Security.IPermission target)" />
      <MemberSignature Language="C#" Value="public override System.Security.IPermission Union (System.Security.IPermission target);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.IPermission</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="target" Type="System.Security.IPermission" />
      </Parameters>
      <Docs>
        <param name="target">A <see cref="T:System.Net.SocketPermission" /> instance to combine with the current instance.</param>
        <summary>
          <para> Returns a <see cref="T:System.Net.SocketPermission" /> that is the union of the current instance and the
 specified object.</para>
        </summary>
        <returns>
          <para>A <see cref="T:System.Net.SocketPermission" /> instance that represents the union of the current
 instance and <paramref name="target" />. If the current instance or <paramref name="target " />is
 unrestricted, returns a <see cref="T:System.Net.SocketPermission" /> instance that is unrestricted.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para>The result of a call to <see cref="M:System.Net.SocketPermission.Union(System.Security.IPermission)" /> is a permission
 that represents all of the access to socket connections represented by
 the current instance as well as the access represented by <paramref name="target" />. Any
 demand that passes either the current instance or <paramref name="target " />passes their
 union.</para>
            <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Union(System.Security.IPermission)" /> and is implemented to
 support the <see cref="T:System.Security.IPermission" /> interface.</para>
          </block>
        </remarks>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="target " /> is <see langword="null" />.</exception>
        <exception cref="T:System.ArgumentException">
          <paramref name="target" /> is not of type <see cref="T:System.Net.SocketPermission" /> .</exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
