System.Net.Sockets.TcpClient.ExclusiveAddressUse Property

Gets or sets a bool value that specifies whether the System.Net.Sockets.TcpClient allows only one client to use a port.

Syntax

public bool ExclusiveAddressUse { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

By default, multiple clients can use a specific port; however, only one of the clients can perform operations on the network traffic sent to the port. You can use the TcpClient.ExclusiveAddressUse property to prevent multiple clients from using a specific port.

This property must be set before the underlying socket is bound to a client port. If you call erload:System.Net.Sockets.TcpClient.Connect, erload:System.Net.Sockets.TcpClient.BeginConnect, TcpClient.#ctor(System.Net.IPEndPoint), or TcpClient.#ctor(string, int), the client port is bound as a side effect of the method, and you cannot subsequently set the TcpClient.ExclusiveAddressUse property

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0