-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PortReuseMode to CosmosClientOptions (#1000)
* add PortReuseMode * update changelog, update baseline, and add VerifyPortReuseModeIsSyncedWithDirect test * add see also links to ReuseUnicastPort * add remarks to PortReuseMode * fix changelog
- Loading branch information
1 parent
7ae5c61
commit 101679f
Showing
8 changed files
with
411 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
namespace Microsoft.Azure.Cosmos | ||
{ | ||
/// <summary> | ||
/// Port reuse policy options used by the transport stack | ||
/// </summary> | ||
public enum PortReuseMode | ||
{ | ||
/// <summary> | ||
/// Windows Server 2016 and newer: Uses the SO_REUSE_UNICASTPORT option if the operating system has automatic client port reuse enabled. | ||
/// Older versions of Windows, Linux, other: Uses default socket options. | ||
/// </summary> | ||
/// <remarks> | ||
/// see also | ||
/// https://docs.microsoft.com/en-us/windows/win32/winsock/sol-socket-socket-options | ||
/// https://docs.microsoft.com/en-us/powershell/module/nettcpip/set-nettcpsetting?view=win10-ps | ||
/// https://support.microsoft.com/en-us/help/3149157/reliability-and-scalability-improvements-in-tcp-ip-for-windows-8-1-and | ||
/// </remarks> | ||
ReuseUnicastPort = 0, | ||
/// <summary> | ||
/// Windows: Tracks client ports used by the Cosmos DB client and reuses them. Ports are reused at DocumentClient scope. | ||
/// Linux: Uses default socket options. | ||
/// </summary> | ||
PrivatePortPool = 1, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters