Click or drag to resize

TcpStreamSettingsWith Method

Returns a new TcpStreamSettings instance with some settings changed.

Namespace:  MongoDB.Driver.Core.Configuration
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax
public TcpStreamSettings With(
	Optional<AddressFamily> addressFamily = null,
	Optional<TimeSpan> connectTimeout = null,
	Optional<Nullable<TimeSpan>> readTimeout = null,
	Optional<int> receiveBufferSize = null,
	Optional<int> sendBufferSize = null,
	Optional<Action<Socket>> socketConfigurator = null,
	Optional<Nullable<TimeSpan>> writeTimeout = null
)

Parameters

addressFamily (Optional)
Type: MongoDB.DriverOptionalAddressFamily
The address family.
connectTimeout (Optional)
Type: MongoDB.DriverOptionalTimeSpan
The connect timeout.
readTimeout (Optional)
Type: MongoDB.DriverOptionalNullableTimeSpan
The read timeout.
receiveBufferSize (Optional)
Type: MongoDB.DriverOptionalInt32
Size of the receive buffer.
sendBufferSize (Optional)
Type: MongoDB.DriverOptionalInt32
Size of the send buffer.
socketConfigurator (Optional)
Type: MongoDB.DriverOptionalActionSocket
The socket configurator.
writeTimeout (Optional)
Type: MongoDB.DriverOptionalNullableTimeSpan
The write timeout.

Return Value

Type: TcpStreamSettings
A new TcpStreamSettings instance.
See Also