Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
<socket> Element (Network Settings)

<socket> Element (Network Settings)

Specifies whether socket operations use completion ports.

<configuration> Element
  <system.net> Element (Network Settings)
    <settings> Element (Network Settings)
      <socket> Element (Network Settings)
<socket 
  alwaysUseCompletionPortsForConnect="true|false" 
  alwaysUseCompletionPortsForAccept="true|false" 
/socket>

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.

Configuration Files

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:
© 2015 Microsoft