Export (0) Print
Expand All

<socket> Element (Network Settings)

Specifies whether socket operations use completion ports.


<socket
  alwaysUseCompletionPortsForConnect="true|false"
  alwaysUseCompletionPortsForAccept="true|false"
/>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

alwaysUseCompletionPortsForAccept

Indicates whether the socket should always use completion ports for Accept method calls.

alwaysUseCompletionPortsForConnect

Indicates whether the socket should always use completion ports for Connect method calls.

Child Elements

None.

Parent Elements

Element Description

settings

Configures basic network options for the System.Net namespace.

Completion ports are supported on Windows NT version 3.5 and later Windows operating systems. Completion ports are recommended for high performance server applications.

This element can be used in the application configuration file or the machine configuration file (Machine.config).

The following code example shows how to specify that completion ports should be used.

<configuration>
  <system.net>
    <settings>
      <socket
        alwaysUseCompletionPortsForAccept="true"
        alwaysUseCompletionPortsForConnect="true"
       />
    </settings>
  </system.net>
</configuration>

Community Additions

ADD
Show:
© 2014 Microsoft