ServicePointManager.ReusePort Proprietà

Definizione

L'impostazione di questo valore della true proprietà su fa sì che tutte le connessioni TCP in uscita da HttpWebRequest usino l'opzione socket nativa SO_REUSE_UNICASTPORT sul socket. In questo modo le porte in uscita sottostanti verranno condivise. Ciò è utile per gli scenari in cui un numero elevato di connessioni in uscita viene effettuato in breve tempo e l'app rischia di esaurire le porte.

public:
 static property bool ReusePort { bool get(); void set(bool value); };
public static bool ReusePort { get; set; }
static member ReusePort : bool with get, set
Public Shared Property ReusePort As Boolean

Valore della proprietà

Restituisce Boolean.

Commenti

Il valore predefinito è false.

Note

Questa proprietà viene implementata solo in .NET Framework.

Si applica a